December 1999
Intermediate to advanced
816 pages
20h 27m
English
Here are the steps performed by the JVM to make a new object:
Allocate memory to hold the object.
Walk up the class hierarchy to the top, via calling the constructor of the superclass from each higher-level class, for example, super() calls super() calls super(), all the way up to Object. Then start making an instance of each object going back down the inheritance hierarchy. So for a Frame object, this means
Make an object of type Object.
Make an object of type Component (although because Component is abstract this doesn't technically happen).
Make object of type Container
Make an object of type Window.
Make an object of type Frame.
Here's an analogy that might help you understand this activity. In order for me to ...
Read now
Unlock full access