• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

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

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
//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?
question-27.JPG
[Thumbnail for question-27.JPG]
question 27
 
Dmitry Zhuravlev
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(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)"?
question-44-third-ptest.jpg
[Thumbnail for question-44-third-ptest.jpg]
 
Dmitry Zhuravlev
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(7)
question 54 of the third practise test
Why can we state that s1 thread will get its lock faster than main thread?
question-54-third-ptest.jpg
[Thumbnail for question-54-third-ptest.jpg]
 
Marshal
Posts: 7289
1401
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Dmitry Zhuravlev
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Marshal
Posts: 7289
1401
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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


You have excellent eyesight
Thanks, I'll make it changed.
 
Dmitry Zhuravlev
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
42.JPG
[Thumbnail for 42.JPG]
 
Devaka Cooray
Marshal
Posts: 7289
1401
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Eliminate 95% of the weeds in your lawn by mowing 3 inches or higher. Then plant tiny ads:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic