It's not a secret anymore!
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes corrections in marcus green test1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "corrections in marcus green test1" Watch "corrections in marcus green test1" New topic

corrections in marcus green test1

Bob Mathews
Ranch Hand

Joined: Feb 26, 2006
Posts: 43
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){
class Over extends Base{
public static void main(String argv[]){
Over o = new Over();
int iBase=0;
public void amethod(int iOver){
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 ?

Deepak Bala

Joined: Feb 24, 2006
Posts: 6662

I compiled and ran it to get Over.amethod. None of your classes need to be public. The rule is that if a class is public it must have the same name as the file name and no more than one public class is allowed per file.

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2398
Notice that the second amethod is inside the definition of Over.
Marcus Green
arch rival

Joined: Sep 14, 1999
Posts: 2813
Two points,
It says very clearly in large letters at the top of the exam
"This exam is based on the objectives of the JDK 1.2 exam.
You can see set of 60 questions for the JDK1.4 exam at JDK1.4 Exam"
(with hyperlink to

The other is that when you come accross an issue such as this you are best advised to compile the code yourself to see what happens. Javac is the best friend of the exam candidate.

Your feedback is appreciated, keep posting

SCWCD: Online Course, 50,000+ words and 200+ questions
I agree. Here's the link:
subject: corrections in marcus green test1
It's not a secret anymore!