When can the private modifier be used with a class? Just in inner classes?
The only modifiers that can be applied to top level classes are public and default (which is what you obtain when you don't type anything). You cannot mark a top level nested class with private or protected access modifiers.
A regular inner class is a member of the outer class just as instance variables and methods are; therefore, the following modifiers can be applied to an inner class: : final : abstract : public : private : protected : static � except static turns it into a static nested class rather than an inner class : strictfp
[Jesse]: You cannot mark a top level nested class with private or protected access modifiers.
Arg, no - the confusing term "top level nested class" refers to static member classes, which certainly can be private or protected. This horrible, evil, stupid term (how can something be both top-level and nested?) was dropped by Sun as of JLS 2nd edition, but unfortunately there are still plenty of books that use it. If you ever see "top-level nested class" just replace it with "static member class".
[Jesse]: A regular inner class is a member of the outer class
No, inner classes include local and anonymous classes, as well as member classes. Local and anonymous classes can't be declared with any access modifiers.
You cannot mark a top level class with private or protected access modifiers.
You can mark a member class (static or nonstatic) with any access modifier.
You cannot mark a local or anonymous class with any access modifiers. [ March 14, 2005: Message edited by: Jim Yingst ]
Is that you, my pal from Sweden, I didn't know you were around on Javaranch. Did you know Sun is coming out with a new cert the Sun certified Java Associate. I would work on the programmer one first though, I don't know if the market is going to take the associate level cert. seriously, so are you thinking of getting some cert.s done?
MCPD (Enterprise Application Developer, Windows Developer, Web Developer - .NET 2.0), MCTS (Windows Apps, Web Apps and Disbributed Applications - .NET 2.0), MCITP (Database Developer & Business Intelligence Developer - SQL Server 2005), MCAD, MSCD.net, SCJP 5, SCWCD 1.4, SCBCD, SCMAD, SCDJWS, SCJA
Joined: Mar 14, 2005
Sorry, but I think you are confusing me with somebody else, I am not from Sweden. But I am serious about getting some of the certifications nailed down. I feel that I am almost ready to take the first java programmer exam.
I just received an email back from Evelyn Cartagena-Meyer with instructions on taking the Java Associate Blueprint Survey, but the link that she supplied, http://sestbt.sun.com:8047/sesCert/, is not working.
Was anyone able to get the link to work?
Also, thanks for the summary Jim! [ March 14, 2005: Message edited by: David Miranda ]