can you please tell me the relation between classes, i didnot see any relation ?
Answer C is incorrect or am I missing something?
Lukas Smith wrote:Only one constructor will be invoked - there is no connection between those classes
Abhik Ghosh wrote:S
3.other super constructors
avi sinha wrote:
static blocks -- > super constructor --- > init() blocks ---> constructor
static blocks --> init of a ---> constructor of a ---> init of b ---> constructor of b ---> init of c ---> constructor of c
As far as the original question goes, you can say that the question has a bug, and for C to be the right answer, there must be inheritance relationship between Small, Small2 and Small3...
Ankit Garg wrote:
I think you should keep static blocks out of this. They are executed only the first time a class is loaded and not with each instance.
S Ali wrote:
what bug are you talking about? seriously is there something missing!