Please see the below code:
class A {
private int b;
A(){
b=5;
}
}
class B extends A {
}
class C {
public static void main(String args[]){
B b=new B();
}
}
When I create an instance of B,the default constructor of B invokes the constructor of A which assigns a value to instance variable b. My query is since instance variables are associated with instances of classes, and we have not created any instance of class A,what does this assignment(b=5) really mean? Also what does the call to A's constructor really mean when there is no instance of A?