Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Mock Exam Errata and the fly likes Error again ( 2nd time, same site ). Mr Hareet! Where are you? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "Error again ( 2nd time, same site ). Mr Hareet! Where are you?" Watch "Error again ( 2nd time, same site ). Mr Hareet! Where are you?" New topic
Author

Error again ( 2nd time, same site ). Mr Hareet! Where are you?

Arijit Daripa
Ranch Hand

Joined: Aug 09, 2008
Posts: 142
Mr. Hareet!
One of the questions in
http://www.irixtech.com/java/scjp/mock-exam/practice-test-2 is



Your answer is (a) and (c).
But darling! I will go for (a) and (b).


SCJP 5
Ashish Hareet
Ranch Hand

Joined: Jul 14, 2001
Posts: 375
Fixed, thanks
vidhya suvarna
Ranch Hand

Joined: Aug 28, 2008
Posts: 148
I have a doubt here,
As interface methods are implicitly public & abstract, so it should not be any problem even if we declare them.
So option e can be right?

Correct me if i am wrong.


SCJP 1.4 - 88%<br />SCWCD 1.5 - Preparing
Ashish Hareet
Ranch Hand

Joined: Jul 14, 2001
Posts: 375
Originally posted by vidhya suvarna:
As interface methods are implicitly public & abstract, so it should not be any problem even if we declare them.


You are correct here Vidhya, it is ok to declare methods in an interface as abstract.

Originally posted by vidhya suvarna:

So option e can be right?

No, option e cannot be correct cause it puts the curly braces at the end of the method declaration. Abstract methods cannot provide an implementation & even by putting empty curly braces we're signaling the method implementation.

Had option e been "public abstract void hasFeed( ) ;", then option e would've been correct.

HTH
Ashish Hareet
vidhya suvarna
Ranch Hand

Joined: Aug 28, 2008
Posts: 148
Thanks Ashish.

One more query,
I tried both the pratice exams on that site and couldnt get more than 70%. Does that mean i am'nt prepared well. Please can you provide with with more mock test links.

Thanks,
Vidhya
Ashish Hareet
Ranch Hand

Joined: Jul 14, 2001
Posts: 375
Originally posted by vidhya suvarna:

I tried both the pratice exams on that site and couldnt get more than 70%. Does that mean i am'nt prepared well.

I wish I could tell end users that getting X% in mock exams means you're ready for the real thing, but I can't. Being prepared is a personal thing. Mock exams can give you a feel for the real thing & help you explore areas that you might've otherwise just glanced over. After giving mock exams don't get disappointed with your scores. Go back & analyze why you got it wrong. My website has this option if you're registered & most downloadble mock exams will review your answers. In the end, ask yourself if you are ready, cause only you'll know if you are ready or not.

Originally posted by vidhya suvarna:

Please can you provide with with more mock test links.
Vidhya

Check the first 2 links in my signature, you'll find about 10 mock exams in all. My website has about 140-150 questions at the moment.

You may also want to check other mock exams - http://faq.javaranch.com/java/ScjpMockTests

I'd like to add that you may want to get used to these 2 links
- http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html
- http://java.sun.com/j2se/1.5.0/docs/api/

Most cert prep books focus on the cert, but the 2 links above will always have answers to all your questions. The JLS may feel a little cryptic but it's the definitive book for Java.

HTH
Ashish Hareet
[ September 15, 2008: Message edited by: Ashish Hareet ]
Ashish Hareet
Ranch Hand

Joined: Jul 14, 2001
Posts: 375
Originally posted by Ashish Hareet:
[QB]
Check the first 2 links in my signature, you'll find about 10 mock exams in all. My website has about 140-150 questions at the moment.

You may also want to check other mock exams - http://faq.javaranch.com/java/ScjpMockTests

I'd like to add that you may want to get used to these 2 links
- http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html
- http://java.sun.com/j2se/1.5.0/docs/api/

Most cert prep books focus on the cert, but the 2 links above will always have answers to all your questions. The JLS may feel a little cryptic but it's the definitive book for Java.

HTH
Ashish Hareet
vidhya suvarna
Ranch Hand

Joined: Aug 28, 2008
Posts: 148
Thanks alot Ashish. I am working on the mock exams provided in your signature.

One query i came across while giving the mock:

Given the following overloaded method declarations

private static void objectCount(int i)
{
//version 1
}

private static void objectCount(Integer i)
{
//version 2
}

Which overloaded method gets called as a result of the following statement - "objectCount(new Byte((byte)10));" ?

The answer is supposed to be objectCount(int i) and i selected Compile-time error as new Byte((byte)10) is calling a Byte wrapper constructor.
So how can the answer be objectCount(int i)?

Kindly help!
Ashish Hareet
Ranch Hand

Joined: Jul 14, 2001
Posts: 375
Vidhya,

Per JLS 15.12.2 - "A method is applicable if it is either applicable by subtyping (�15.12.2.2), applicable by method invocation conversion (�15.12.2.3), or it is an applicable variable arity method (�15.12.2.4)."

Take note of the method invocation conversion & refer to JLS 5.3 which allows for the following - "an unboxing conversion (�5.1.8) optionally followed by a widening primitive conversion. "

In the case of your question since there is no explicit overloaded version of objectCount which takes a Byte object, an unboxing conversion is applied to the Byte object followed by a widening which results in a method match with the overloaded method that accepts an int.

JLS 15.12.2 - http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#292575
JLS 5.3 - http://java.sun.com/docs/books/jls/third_edition/html/conversions.html#12687

Did you try the code sample to verify if the answer was correct ? I got the impression you didn't. I try to provide questions with code so that end users can try out for themselves. The goal with my mock exams is to motivate end users to question the validity of any scenario which imho makes you well prepared for the real thing.

Anyways, I do apologize for the delayed response, if you'd like to get my attention you can leave a note in the iRix Forums for SCJP & better still create a new thread here on Javaranch, SCJP Forums to get more brains to help with your query.

HTH
Ashish Hareet
vidhya suvarna
Ranch Hand

Joined: Aug 28, 2008
Posts: 148
I will surely to run and check the output myself before i query.
As i am preparing for 1.4 i wasnt aware of autoboxing concept.

Thanks for providing the details.
Ashish Hareet
Ranch Hand

Joined: Jul 14, 2001
Posts: 375
Originally posted by vidhya suvarna:
I will surely to run and check the output myself before i query.
As i am preparing for 1.4 i wasnt aware of autoboxing concept.

Thanks for providing the details.


Vidhya,

You might wanna check this link for 1.4 specific exams on my site - http://www.irixtech.com/category/java/scjp-14
There are 3 tests for SCJP 1.4

Since you just mentioned that you selected the option, I made an assumption, apologize for that.

HTH
Ashish Hareet
vipin jain
Ranch Hand

Joined: Aug 24, 2008
Posts: 122
hi Ashish,

I am preparing for SCWCD5 is there any mock exam link available for same just like scjp5/6 ?
if yes please send me url.


Best Regards,<br />Vipin<br />MCA, SCJP5, SCWCD in progress
Ashish Hareet
Ranch Hand

Joined: Jul 14, 2001
Posts: 375
Vipin,

Unfortunately, I do not have any mock exam questions for SCWCD at this time. Let me check with a couple of folks I know, if they'd be willing to help set up mock exams for SCWCD. Will update this thread, if I manage to get some.

Thanks
Ashish Hareet
 
jQuery in Action, 2nd edition
 
subject: Error again ( 2nd time, same site ). Mr Hareet! Where are you?