Hi all, I have extracted one of the practice question from K&B 1.4
what is the result?
a)The code will not compile because of an error on line 12 of class Foo.
b)The code will not compile because of an error on line 7 of class Foo.
c)The code will not compile because of an error on line 4 of class
Test.
d)The code will not compile because of some other error in class Test.
e)An exception occurs at runtime.
f)x is 5
x is 6
The correct answer is e, but the book says so because the wait is not in a synchronized block, but I thought line 4 would have caused a compile time error already because there is no such a thing as runnable object???
Can anyone clarify?
Thx
Kevin
[ October 30, 2005: Message edited by: Barry Gaunt ]