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