File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes access modifier and constructors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "access modifier and constructors" Watch "access modifier and constructors" New topic
Author

access modifier and constructors

Alpana Singh
Ranch Hand

Joined: Sep 27, 2005
Posts: 36
This is the question fron jdiscuss.com mock exam.

You can only call public and protected constructors of the super class in a subclass if the subclass is not in the same package because only those are inherited.


I answered true,but the answer is false.

Somebody plz give me the reason behind this
Sandeep Chhabra
Ranch Hand

Joined: Aug 28, 2005
Posts: 340
Hi,

You can only call public and protected constructors of the super class in a subclass if the subclass is not in the same package because only those are inherited.


I think constructors are not inherited.


Regards<br />Sandy<br />[SCJP 5.0 - 75%]<br />[SCWCD 1.4 - 85%]<br />------------------<br />Tiger, Tiger burning bright,<br />Like a geek who works all night,<br />What new-fangled bit or byte,<br />Could ease the hacker's weary plight?
Mandy Hou
Greenhorn

Joined: Oct 15, 2005
Posts: 21
constructors can not inherited.


Regards<br />Mandy<br /> <br />-----------------<br />Thinking,Thinking,Thinking,<br />Before you do any action!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: access modifier and constructors