About Question enthuware.ocpjp.v8.-2-.-1111 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
excluzzzive
Posts: 4
Joined: Tue Dec 06, 2016 4:11 am
Contact:

About Question enthuware.ocpjp.v8.-2-.-1111 :

Post by excluzzzive »

Hello!

For me the first answer is not so clear, could you clarify it:
Answer: One of the constructors of each class is called as a result of constructing an object of class C.
Explanation: To create any object one and only one constructor of that class and each of the super classes is called.
But if we create class C like this - new C("string") - also private constructor of class C would be called. So, it is already 2 constructors of class C and not 1 what is mentioned.

Thank you.

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1111 :

Post by admin »

Yes, you are right. The statement is actually about the constructors that are invoked from outside the constructors. It does not count the constructors that are invoked from within another constructor using this(...). I have updated the explanation to make it clear.

thank you for your feedback!
Paul.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests