This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
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
Sheriff

Joined: Aug 03, 2008
Posts: 9319
    
  17

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://aspose.com/file-tools
 
subject: Thread question from www.scjptest.com