Q:

How is the end of an object denoted in java in memory(or somewhere else)?

For example, you create two objects 
Circle circle1 = new Circle();
Circle circle2 = new Circle();

I learned that circle1 (as well as circle2) points to the starting place of the object in memory on the heap. But now the question comes up, how does it know when it ends?
The only thing I can come up with is that every class equals a new declared type and Java stores the space each type takes somewhere else, so that it then knows that an circle1 is equal to let's say 20 bytes in memory. So that it then magically can not alter anything behind that point which is at circle2. This is just my imagination, I hope to find the real answer.

A:

The representation of objects in the JVM heap depends on the implementation as mentioned in the following quote from this link which describes the structure of the JVM:

The Java Virtual Machine assumes no particular type of automatic storage management system, and the storage management technique may be chosen according to the implementor's system requirements

Also from that link:

2.7. Representation of Objects
The Java Virtual Machine does not mandate any particular internal structure for objects.
In some of Oracle’s implementations of the Java Virtual Machine, a reference to a class instance is a pointer to a handle that is itself a pair of pointers: one to a table containing the methods of the object and a pointer to the Class object that represents the type of the object, and the other to the memory allocated from the heap for the object data.

