This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Mock Exam Errata and the fly likes Nested top level class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Mock Exam Errata
Reply Bookmark "Nested top level class" Watch "Nested top level class" New topic
Author

Nested top level class

sreelakshmi sarma
Ranch Hand

Joined: Mar 02, 2000
Posts: 130
Hi,
This is from Marcus mock exam3.
Is the following statement
1) true or
2) false?
"a nested top-level class cannot declare any static variables, static methods, or static
initializers."
ANSWER IS TRUE.
Nested top level class means static inner class right??static inner classes can have static stuff right???
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Sree,
You are right. This discussion had already come up in Marcus's Discussion board and he accepts the qstn is in error. Since his page has got frames I can't direct you to the exact page. So I post the answer from Marcus here.
I am moving this to Errata Forum. Thanks.
regds
maha anna

I have a feeling you are right and the question is wrong. However I put notes on all my answers and you will see that I make a reference to the O'reilly version of the Java Language Reference (page 123 to be exact) where it makes this rather odd claim.
Noticing how wierd this was I have looked up the errata at oreilly.com and this is not mentioned.
Strange. But to get back to your question I think my question is in error.
Marcus

sreelakshmi sarma
Ranch Hand

Joined: Mar 02, 2000
Posts: 130
Thanks Maha.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Nested top level class
 
Similar Threads
Nested class
Clarification of Inner classes
Nested top level class
Inner class
JQplus