Sun Certified Java Programmer Exam Simulator
What will happen if you compile/run this code?
1: public class Q1 extends Thread
2: {
3: public void run()
4: {
5: System.out.println("Before start method");
6: this.stop();
7: System.out.println("After stop method");
8: }
9:
10: public static void main(String[] args)
11: {
12: Q1 a = new Q1();
13: a.start();
14: }
15: }
A) Compilation error at line 7.
B) Runtime exception at line 7.
C) Prints "Before start method" and "After stop method".
D) Prints "Before start method" only.
Posted by
shantanu
on April 01, 2000
/
/
VSNL-POP
Your unsubscribe request has been processed and you have been unsubscribed
from the Joke A Day.
Thanks for being here. We hope you will consider coming back again
some day.
Ray Owens
Joke A Day
Your unsubscribe request has been processed and you have been unsubscribed
from the Joke A Day.
Thanks for being here. We hope you will consider coming back again
some day.
Ray Owens
Joke A Day