For objects with automatic memory allocation or dynamic memory allocation, object creation generally happens deterministically, either explicitly when an object is explicitly created ( such as via new in C + + or Java ), or implicitly at the start of variable lifetime, particularly when the scope of an automatic variable is entered, such as at declaration.