Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Q30 of the 1st mock exam of Marcus Green

Dep Joy
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
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 ]
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic