aspose file tools*
The moose likes Mock Exam Errata and the fly likes Some strange points in Devaka Cooray's test. Can anyone explain this? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "Some strange points in Devaka Cooray Watch "Some strange points in Devaka Cooray New topic
Author

Some strange points in Devaka Cooray's test. Can anyone explain this?

Dmitry Zhuravlev
Ranch Hand

Joined: Apr 14, 2010
Posts: 93
//if I can copy-paste the text from the exam please tell me how. writing the whole questions manually takes to much time..

SCJP test 6.0:

(1) question 12 of the second practise test. There is a code which throws "IllegalThreadSateException", and it is considered to be correct! No explanation for that option (G) available.

(2) question 27 of the second practise test. It has strange explanation: "method parseBoolean doesn't exists". In fact method parseBoolean exists, but it returns boolean, so you cannot call a getClass from it.

(3) question 8 of the third practise test. It states that thread g would throw InterruptedException because it is being interrupted while sleeping, but in fact - whether we really can state that thread g will start its run method before g.interrupt() is called? A sketch of a code:


(4) question 17 of the third practise test. This question is about English language, not Java language what does the following phrase mean:
Drag and drop appropriate fragments to the given slots, so that produces a unique output at every times.
???

I dont understand whether the task is to produce RANDOM output or CONSTANT? A correct answer produces CONSTANT output for every run of the program. While from my point of view "unique at every times" means "different every time".

(5) Attached is the question 27 of the third practise test. I wonder why the correct answer prints zero six times, but not three times?



[Thumbnail for question 27.JPG]

Dmitry Zhuravlev
Ranch Hand

Joined: Apr 14, 2010
Posts: 93
(6)
Here is the correct answer for question 44 from the third practise exam. Why can't I insert "throw new RuntimeException()" insted of "wait(78L)"?


[Thumbnail for question 44 third ptest.jpg]

Dmitry Zhuravlev
Ranch Hand

Joined: Apr 14, 2010
Posts: 93
(7)
question 54 of the third practise test
Why can we state that s1 thread will get its lock faster than main thread?


[Thumbnail for question 54 third ptest.jpg]

Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3274
    
  52

Hi Dmitry,

First of all thank you very much for taking your time to provide the feedback.

(1). IllegalThreadStateException is an unchecked exception - it extends RuntimeException. Therefore, you can use it in the throws part of a method declaration without having any effect and thus the option (G) is correct.

(2). Yes, this is an error and it was identified and corrected long ago with the Beta* release.

(3). It was assumed that the sleep method takes the exact time as the value which was passed as the argument for that method, and all other executions take negligible time for the execution. This type of questions are there in the sun exams - but with an explicit statement which mentions the above assumption. This is in the current Beta update which will be released in next month

(4). Typos happen eveywhere.

(5). Did you try running this program yourself, before you found this as an error?

(6). If you insert "throw new RuntimeException()", you will get a compile time error, which clearly states why you cannot use it. Please try it out.
(Hint: InterruptedException is a checked exception).

(7).
Dmitry Zhuravlev wrote:both threads aquire s1 lock. why can we state that s1 thread will get it first?

Same reason for question 3.


I appreciate your feedback and thanks again for that. Please let me know if you have any question.

Thanks,

Devaka

*Beta release - you can find it here: http://examlab.tk/beta

Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Dmitry Zhuravlev
Ranch Hand

Joined: Apr 14, 2010
Posts: 93
Devaka, thank you for your answers! This clarifies my problems. I will doublecheck all these questions.

As for my question one - it was not about the correctness of the answer, but about the misprint: IllegalThreadSATEException.

By the way, how many identical questions presented in 5.0 and 6.0 versions of your test? By this I want to know can the ExamLab 5.0 be recommended for preparation to SCJP 6.0 also, or most of the questions are similar?
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3274
    
  52

Dmitry Zhuravlev wrote:....but about the misprint: IllegalThreadSATEException.

You have excellent eyesight
Thanks, I'll make it changed.
Dmitry Zhuravlev
Ranch Hand

Joined: Apr 14, 2010
Posts: 93
I have scored only 48% on Final Exam... One of the reasons - to little time... last 10 or 15 questions I was in a great hurry and no time for going back to skipped questions

Anyway, here is a question: why cant I use the 'private' modifier instead of 'static' word in the enum declaration? If I can, then my answer is correct, but it can be considered incorrect by the test.


[Thumbnail for 42.JPG]

Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3274
    
  52

Dmitry Zhuravlev wrote:I have scored only 48% on Final Exam... One of the reasons - to little time... last 10 or 15 questions I was in a great hurry and no time for going back to skipped questions

Time management is a skill that you should improve for any type of exam.


Dmitry Zhuravlev wrote:Anyway, here is a question: why cant I use the 'private' modifier instead of 'static' word in the enum declaration? If I can, then my answer is correct, but it can be considered incorrect by the test.

Aren't you using the beta version of ExamLab? This error was already recognized and corrected with that release.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Some strange points in Devaka Cooray's test. Can anyone explain this?