?
What is the output for the below code?
What is the output for the below code?
public class Test extends Thread{
public static void main(String argv[]){
Test t = new Test();
t.run();
}
public void start(){
for(int i = 0; i < 10; i++){
System.out.println("Value of i = " + i);
}
}
}
public class Test extends Thread{
public static void main(String argv[]){
Test t = new Test();
t.run();
}
public void start(){
for(int i = 0; i < 10; i++){
System.out.println("Value of i = " + i);
}
}
}
Join the Discussion
Login to post a comment or share your explanation.
Loginnot A and B because run is already defined in thread which is already extended
Not c because start() not called.