You can call only public and protected constructors of the super class from a subclass if the subclass is not in the same package because only those are inherited.
Correct answer: No
We can`t call constructor of super class if constructor is private and we can`t call constructor of super class with "default" acessor (because another package).
So we have only two valid acessors public and protected. and anser have to be YES.
The question doesn`t implies inheritane of constructors. We just consider constructors of super class.
enthuware.ocajp.i.v7.2.934
Moderator: admin
-
- Posts: 42
- Joined: Tue Feb 12, 2013 4:35 pm
- Contact:
Online
-
- Site Admin
- Posts: 10066
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: enthuware.ocajp.i.v7.2.934
The question says "...because only those are inherited". You have to consider what the problem statement says in totality and then decide whether it is a true statement or not.
In this case, the above mentioned part is wrong because constructors are never inherited.
HTH,
Paul.
In this case, the above mentioned part is wrong because constructors are never inherited.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 42
- Joined: Tue Feb 12, 2013 4:35 pm
- Contact:
Re: enthuware.ocajp.i.v7.2.934
Yeah, it sounds reasonable.
Thanks,
Alex
Thanks,
Alex
Who is online
Users browsing this forum: Bing [Bot] and 243 guests