[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

JAVA Programming :: Threads - Discussion

Home > JAVA Programming > Threads > MCQs Questions Discussion

7 / 6

What will happen when you attempt to compile and run the following code ?

public class Test extends Thread{
public static void main(String argv[]){
Test t = new Test();                                                                                                                                                  t.run();
t.start(); 
}
 public void run(){
 System.out.println("run-test");
 }
 }

Arun-test run-test

Brun-test

CCompilation fails due to an error on line 4

DCompilation fails due to an error on line 7

Answer: Option (Login/Signup)

Show Explanation

Asked In ::

Post Your Answer Here:     

Reply    
Rate This: +0 -0
    Report


Report Error

Please Login First Click Here