• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ans to q-30 of Marcus green Mock-1 (SCjp 1.4)

 
Ashish Mittal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just gave mock test-1 for SCJP1.4 and scored 90% .


But the ans to Qno-31 seems to b incorrect


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

ans given by u --- public,private,static ;

But i feel only static is applicable (as this is an inner(Local) class in static context to which no accessibility modifiers are applicable ....Refrence table 7.1 page 286 from Mughal ramussen 2 edition ).

Otherwise i enjoyd giving the test ....
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ashadonis, I think you posted the right question in the wrong place... Here is SCJP forum out there, where you can find many SCJP aspirants...

Just my 2 cents...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic