My teacher gave me a question:
\"What occurs when objects are created in Java\".
To the best of my knowledge, memory allocation
On top of what other people have said, if this is the first use of the object then its Class must be initialised -as described in the JLS (the section before the one on new instance creation!).
This basically involves loading into memory the necessary information about the class i.e. creating a Klass
object for the static variables and method table to live. This may also involve loading super classes and interfaces. This is all carried out by the ClassLoader
.