SCJP 88% | SCWCD 84%
can you please tell me the relation between classes, i didnot see any relation ?
Answer C is incorrect or am I missing something?
SCJP6, SCWCD5, OCE:EJBD6.
BLOG: http://leakfromjavaheap.blogspot.com
Lukas Smith wrote:Only one constructor will be invoked - there is no connection between those classes
![]()
SCJP6
SCJP6, SCWCD5, OCE:EJBD6.
BLOG: http://leakfromjavaheap.blogspot.com
Experience and talent are independent of age
SCJP 6
Abhik Ghosh wrote:S
1.super()
2.init blocks
3.other super constructors
SCJP 5.0 SCWCD 5.0
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
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
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...
SCJP 6
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.
SCJP 5.0 SCWCD 5.0
S Ali wrote:
what bug are you talking about? seriously is there something missing!
SCJP 5.0 SCWCD 5.0
SCJP 6.0
SCJP 88% | SCWCD 84%
Regards
Salil Verma