aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Access modifier to an Abstract Class constructor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Access modifier to an Abstract Class constructor" Watch "Access modifier to an Abstract Class constructor" New topic
Author

Access modifier to an Abstract Class constructor

Reshma Shanbhag
Ranch Hand

Joined: Sep 17, 2002
Posts: 202
Whats the answer to following question.
Question :
Which of the following access modifiers can be supplied for the constructor of an abstract class ?
Options :
a . public
b . protected
c . private
d . default
e . friendly
f . No access modifier


SCJP 1.4, SCWCD 1.4
Karthik Veeramani
Ranch Hand

Joined: Dec 22, 2002
Posts: 132
Using public, private, protected, or default access doesnt generate compile error. If u extend that abstract class (or do something that invokes super class constructor), it gives a compile error if the constructor is not reachable (for example, if its private it gives an error).
Thanks
Karthik.


Thanks<br />Karthik<br />SCJP 1.4, CCNA.<br /> <br />"Success is relative. More the success, more the relatives."
Reshma Shanbhag
Ranch Hand

Joined: Sep 17, 2002
Posts: 202
Thanks for you help Karthik.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Access modifier to an Abstract Class constructor