aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Thread question from www.scjptest.com Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Thread question from www.scjptest.com" Watch "Thread question from www.scjptest.com" New topic
Author

Thread question from www.scjptest.com

Anbarasu Aladiyan
Ranch Hand

Joined: Jun 02, 2009
Posts: 182

This question was asked in scjptest.com website
Question:
Given the code. What is the result?
And Options are
A)Compilation fails
B)An exception is thrown at runtime
C)"BeginRunEnd" is printed
D)"BeginEndRun" is printed.
E)"BeginEnd" is printed
And I thought answer is "unpredictable".Because it may print "BeginRunEnd" or "Run BeginEnd". I have checked it by adding the below code at line AAm I correct?
If yes. Will we get these type of questions in real exam?
And which option/answer is correct?

A.A.Anbarasu
Chinna Eranna
Ranch Hand

Joined: Dec 08, 2009
Posts: 174

I will go for..

C)"BeginRunEnd" is printed

Because.. that is the possible answer in the options.. provided.

- Chinna
Harpreet Singh janda
Ranch Hand

Joined: Jan 14, 2010
Posts: 317

Yes, Answer is unpredictable but because in the give options the only possible answer is "BeginRunEnd" and unpredictble is not in the options, so this should be the answer.
Anbarasu Aladiyan
Ranch Hand

Joined: Jun 02, 2009
Posts: 182

Thanks Chinna Eranna and Harpreet Singh janda,
Will we get these type of questions in real exam?
Harpreet Singh janda
Ranch Hand

Joined: Jan 14, 2010
Posts: 317

I have not taken exam yet so can't say anything
Chinna Eranna
Ranch Hand

Joined: Dec 08, 2009
Posts: 174

me too
Anbarasu Aladiyan
Ranch Hand

Joined: Jun 02, 2009
Posts: 182

lol
Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9189
    
    2

The questions on the real exam won't be ambiguous. This question is perfectly valid though, as you are asked to choose one option and one of the answer is possible...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Anbarasu Aladiyan
Ranch Hand

Joined: Jun 02, 2009
Posts: 182

Thank you Ankit.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Thread question from www.scjptest.com
 
Similar Threads
Help in a question about Threads
Threads Question
Concurrency question
sleep() method
Thread