Tuesday, August 13, 2013

How many objects are created when you create an object of a plain class?

This is shared out of a random thought. Let’s say we’ve got two classes:
class A{}
class B extends A{
 static B obj = new B();
}
Do not read further until you have the answer to the question.