Hi!
I found in a mock exam:
public class ThreadTest extends
Thread {
public void run() {
System.out.println("In run");
suspend();
resume();
System.out.println("Leaving run");
}
public static void main(
String args []) {
(new ThreadTest()).start();
}}
A - Compilation will fail in the method main.
B - Compilation will fail in the method run.
C - A warning will be generated for method run.
D - The string "In run" will be printed to standard out.
E - Both strings will be printed to standard out.
F - Nothing will happen.
The answer is D but why is not E??
Thanks in advanced