This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes constructors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "constructors" Watch "constructors" New topic
Author

constructors

Puja S
Ranch Hand

Joined: Jan 06, 2005
Posts: 51
Hi,

Constructors can have any access modifiers ( public,protected,default and private ). Can anybody correct me if I'm wrong ?

Also, Top-Level class can be public,default,final and abstract. Please correct me if I'm wrong ?

Thanks.
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
You are correct puja ...

one more addition - top-level class may also have strictfp .
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Also note that "abstract" cannot be used in conjunction with "final" or "strictfp."

(And, of course, "default" is not technically a modifier.)


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: constructors