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 Q30 of the 1st mock exam of Marcus Green 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 "Q30 of the 1st mock exam of Marcus Green" Watch "Q30 of the 1st mock exam of Marcus Green" New topic
Author

Q30 of the 1st mock exam of Marcus Green

Dep Joy
Greenhorn

Joined: May 07, 2003
Posts: 20
Question 30)
public class MyClass1 {
public static void main(String argv[]){ }
/*Modifier at XX */ class MyInner {}
}
What modifiers would be legal at XX in the above code?
1) public
2) private
3) static
4) friend

According to my understanding, none of the option is correct. However, following description is provided on the same mock exam page:

Answer 30)
Back to Question 30
Objective 4.1)
1,2,3
public, private, static are all legal access modifiers for this inner class.

However, I tried all of these three with Eclipse 3.0 (Sun JDK 1.4.0), none of them will compile, had I missed something, or Marcus provided wrong keys?
Many thanks!
[ October 07, 2003: Message edited by: Dep Joy ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Q30 of the 1st mock exam of Marcus Green
 
Similar Threads
local nested class
to q-30 of Marcus green Mock-1 (SCjp 1.4)
ans to q-30 of Marcus green Mock-1 (SCjp 1.4)
Marcus Exam 1 question
can inner class be "public"? if outer class is "public" already.