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:
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?
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 ]