SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Ernest Friedman-Hill wrote:I'm afraid I can't undnerstand what Jack is getting at, so I can't respond directly; nevertheless, I can give you the correct answer.
An instance of a class is like an onion. The innermost core is always the bits needed to comprise a java.lang.Object; each layer adds the bits for a derived class. So a Ford instance contains all the bits for an Object, and a Car, and the bits added for a Ford. Furthermore, to make sense of a Ford instance, the JVM needs the Ford class and the Car class and the Object class to all be loaded.
But if you create a Ford, it is a single object. There is no separate Car object, no separate Object object. What you see in your editor is the layers of the onion that make up a single Ford object.