Sail E0 Webinar
Question
What will happen when you attempt to compile and run the following code?
1. public class Test extends Thread{
2. public static void main(String argv[]){
3. Test t = new Test();
4. t.run();
5. t.start();
6. }
7. public void run(){
8. System.out.println("run-test");
9. }
10. }
Options:
A .  run-test run-test
B .  run-test
C .  Compilation fails due to an error on line 4
D .  Compilation fails due to an error on line 7
E .  None of these
Answer: Option A

Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :


Latest Videos

Latest Test Papers