public class B extends A{
// code goes here
}
public class C extends B{
public void method1(){
C c = new C();
}
}
Since C is extending B which in turn is extending A ,when I create object of C how many objects will be created in JVM .
One object will be directly created. I say “directly” because initialization expressions or constructor code could create other objects using “new”.
Creating that one C object will cause four constructor calls. Immediately before the body of C’s constructor, there is an explicit or implicit call to a B constructor. Similarly, B’s constructor calls an A constructor, which calls the Object constructor.
The object is a C, and is a B, and is an A, and is an Object, and by the end of the process will have been initialized as each of them.
For full gory details on this process, see the JLS.