This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Marcus Green new exam feedback Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Marcus Green new exam feedback" Watch "Marcus Green new exam feedback" New topic
Author

Marcus Green new exam feedback

Vad Fogel
Ranch Hand

Joined: Aug 25, 2003
Posts: 504

Your response was Not Correct
Which of the following statements are true of a method local inner class?
Incorrect options are shown by strikethrough, any options you chose are marked by a tick
1 It has access to all members of its enclosing class
2 It can only access final variables of its enclosing method
3 It can be marked as static
4 It can only access final members of its enclosing class
You selected 1 option
The Correct Answer is
1) It has access to all members of its enclosing class
2) It can only access final variables of its enclosing method
There are no restrictions on on what a method local inner class can access from the enclosing class, though it may only access final members of its enclosing method.



I thought option 2 eliminates option 1, so maybe the word only is redundant.
[ October 17, 2003: Message edited by: Vad Fogel ]
Barkat Mardhani
Ranch Hand

Joined: Aug 05, 2002
Posts: 787
Vad,
I guess you are technically right. As you and I know it auther is only talking about method variables in this sentence.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Marcus Green new exam feedback
 
Similar Threads
Examulator doubt on inner classes
JQ+ Question
the Quession about static of inner class
INNER CLASS AGAIN~~~! So terrible
? inner class or local class member