Given: Which two are true?
A.
No output is produced
B.
No new threads of execution are started within the main method
C.
Two new threads of exclusion are started within the main method
D.
Thread is printed
E.
Runnable is printed
F.
One new thread of execution is started within the main method
B is wrong, F seems the good one instead.
The code is bot compilable 🙁
There are no static method start() in Thread class.
may be
t.start() instead?
if so – then A and F.
Code to check below:
public class SuperThread extends Thread {
public void run() {
System.out.println(“tun”);
super.run();
}
public void run(String s) {
System.out.println(“Thread”);
}
public void run(Runnable r) {
r = new Runnable() {
@Override
public void run() {
System.out.println(“Runnable”);
}
};
}
public static void main(String[] args) {
Thread t = new SuperThread();
t.start();
}
}