hi all
i have just appeared in the marcus green
test no 1.
11 questions were not in the current sylabus for scjp1.4
And question 59 says
class Base{
private void amethod(int iBase){
System.out.println("Base.amethod");
}
}
class Over extends Base{
public static void main(
String argv[]){
Over o = new Over();
int iBase=0;
o.amethod(iBase);
}
public void amethod(int iOver){
System.out.println("Over.amethod");
}
}
1) Compile time error complaining that Base.amethod is private
2) Runtime error complaining that Base.amethod is private
3) Output of "Base.amethod"
4) Output of "Over.amethod
Answer :4
but i think Answer should be compile time error as none of the classes are public
correct we if i m wrong
And i have scored 41 correct of those 49 questions 84% roughly
what u ranchers suggest ?
regards
Nishant