The correct answer to the following Q is d). Should it not be e)?
What is the result of compiling and executing the following
Java class:
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.
Select the most appropriate answer.