This came from http://www.lanw.com/java/discover/default.htm : For each Java keyword in the left column, check the categories which it can be used as a modifier. (For instance you can declare a "final static method") <pre> keywords | classes | method | variables static | a | b | c final | d | e | f protected | g | h | i </pre>
My answers are - a, b, c, d, e, f, h, i - thinking class includes inner classes, and there can be static inner classes. Would anybody say otherwise? Please explain, as the correct answers are only - b, c, d, e, f, h, i - Comment for 'a' is "No, although you can have a class with only static methods and variables". Thanks!!! [This message has been edited by Emerald HA (edited April 26, 2001).]
Kishore Pamu
Ranch Hand
Joined: Mar 18, 2001
Posts: 35
posted
0
Hi!Emerald, A toplevel class can be declared public or default(i.e no access modifier). private,protected and static cannot be declared to toplevel class Only the inner classes can be declared static ,private,default(i.e no access modifier),protected,public. hope this helps!
Kishore
Anonymous
Ranch Hand
Joined: Nov 22, 2008
Posts: 18944
posted
0
Thanks Kish. I guess this is a matter of how the question should be interpreted. Does 'classes' per se, as given in the question, just mean top-level class and excludes nested classes? - Emerald -
[This message has been edited by Emerald HA (edited April 27, 2001).]
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.