[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

2 / 6

What is the output for the below code ?

class A implements Runnable{
public void run(){
System.out.println("run-a");
}
}
public class Test {
public static void main(String... args) {
A a = new A();
Thread t = new Thread(;
t.start();
t.start();
}
}

Arun-a

Brun-a run-a

CCompilation fails with an error at line 6

DCompilation succeed but Runtime Exception

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