Hello Everyone!
Thanks for the immediate response to my previous posts
I have the following code from John Hunts Mock Exam:
public class MyThread extends
Thread {
public void run() {
System.out.println("In run");
suspend();
resume();
System.out.println("Leaving run");
}
public static void main(
String args []) {
(new MyThread()).start();
}
}
When I try to compile this code with jdk1.3, it gives me an error: Note:
C:\jdk1.3\Class\MyThread.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
But the answer for this question is :
The string "In run" will be printed to standard out.
Can anyone please explain the problem here.