wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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
 
Consider Paul's rocket mass heater.
 
subject: constructors
 
Similar Threads
Private Constructor??
static modifiers
Vector
Access control
class accessibility