Hi all,
I apologize if this the wrong forum location.
I was running some mock
SCJP exams on
http://scjptest.com today and was presented with the following question:
Given the code. What is the result?
The possible answers were:
A) Compilation fails.
B) An exception is thrown at runtime.
C) "BeginRunEnd" is printed.
D) "BeginEndRun" is printed.
E) "BeginEnd" is printed.
As I understand it, a and main are going to be separate threads, therefore the output could be "BeginRunEnd" (option C), but could also be "RunBeginEnd" depending on the OS
thread process sequence.
Just to be sure, I tried the code on my Mac in Eclipse and about 1 out of 5 times the result was "RunBeginEnd".
I'm wondering on the real exam how many questions are similar to this format - where the answer option is only part of the real answer, or is a 'choose the best possible answer' format?
Cheers!
Chris