I saw two questions in John Hunt's mock exam which seemed ambiguous to me
Q. 34
Which methods may cause a
thread to stop executing?
a) sleep();
b) stop();
C) yield();
d) wait();
e) notify();
f) notifyAll()
g) synchronized()
Select all correct answers.
Q. 30
What class must an inner class extend:
a) The top level class
b) The Object class
c) Any class or interface
d) It must extend an interface
Select the most appropriate answer
The correct answers are :
34) a,b,c,d
30) c
My question is:
1) shouldn't the question 34 have been "Which methods may cause a thread to stop running?" instead of "Which methods may cause a thread to stop executing?"
I chose (b)
2)I thought only anonymous inner classes need to implement an interface or extend a class.The way the q is phrased,it seems like all inner classes need to implement an interface or extend a class.Is this correct?
I chose (b) because all classes indirectly extend Object class
thankx in advance for your response
kris