Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Round-up question #34  RSS feed

Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,
just a short question about the round-up game.
I just played and got a question (#34) which was

when an object is created using new(), its constructor will not complete until all constructors higher on the inheritance tree have completed.

I can see wut the purpose of this question is, BUT IMHO the answer has to be FALSE. Perhaps i read this question too carefully, but look at this

When you create ConstructorTest, implicit call to super() is made. This is fine, and i do not have problems with that. But that's all. Base(int) will not get called, but in the question you asked for all constructors higher in the inheritance tree....
Base(int) is also in the inheritance tree, or isn't it???
Hope you can give me an answer, so that i know how careful i have to read such questions....
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!