wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Doubt over ePractice exam question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Doubt over ePractice exam question" Watch "Doubt over ePractice exam question" New topic
Author

Doubt over ePractice exam question

Gordy Bone
Ranch Hand

Joined: Feb 25, 2007
Posts: 31
This following is from a web-based mock exam. I disagree with the answer given please let me know if you think I'm mistaken or not:

Given: t is a reference to a valid Thread object And the following valid run() method for t:




And:




Which can be a result?
- go followed by an exception [CORRECT]
- An exception is thrown with no other output. [MARKED AS INCORRECT]

I disagree that the second option is incorrect. Surely there is no guarantee that thread t will have been given processor time before the second invocation of start(), and therefore no guarantee that "go" will even be printed?


Gordy


SCJP 5, SCWCD 5
Srinivasan thoyyeti
Ranch Hand

Joined: Feb 15, 2007
Posts: 557
Hi Gordy,

I agree with you, There is no guarantee that "go" will print.

So Those kind of questions should be avoided.

I can say Main exam will not contain, ambiguous questions or answers.
As i have answered one of the questions with similar kind of narration.
It was very clear indeed. no ambiguity.
[ March 26, 2007: Message edited by: Srinivasan thoyyeti ]

Thanks & Regards, T.Srinivasan
SCWCD 1.4(89%), SCJP 5.0(75%)
Gordy Bone
Ranch Hand

Joined: Feb 25, 2007
Posts: 31
Thanks Srinivasan,

That is reassuring to hear. I've come across a few ambiguous questions in mocks and it is frustrating. (This question came from Sun themselves, which is pretty disappointing).

Cheers,

Gordy
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Doubt over ePractice exam question
 
Similar Threads
Problem : Threads ; Reference Cert Pal
threads
Threads
Question on Thread
Will a started thread run to completion in this example?