Might be its stupid question!!
Suppose
public class A{
Long weight = 1200L;
Integer i = 10;
int z = 20;
A a; }
public class B extends A{
public static void main(String[] args) {
B b = new B();
B c = new B();
B d = new B();
}
}
I want to know how many objects are going to be created? what i know , 3 objects corresponding to b , c , d and Long , Integer ,int for each reference. Moreover , each object corresponding to b , c ,d has instance variable "a".
Is this correct? If so , does it mean if i have an instance variables with wrapper class or any pre-defined class , i own object wrt defined class (in mycase Integer and Long)?
Thanks in advance