Predict the output:class A implements Runnable{ public void run(){ try{ for(int i=0;i<4;i++){ Thread.sleep(100); System.out.println(Thread.currentThread().getName()); } }catch(InterruptedException e){ } }}public class Test{ public static void main(String argv[]) throws Exception{ A a = new A(); Thread t = new Thread(a, "A"); Thread t1 = new Thread(a, "B"); t.start(); t.join(); t1.start(); }}

TRUE ANSWER : ?
YOUR ANSWER : ?

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); } }}

TRUE ANSWER : ?
YOUR ANSWER : ?

What notifyAll() method do?

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following program code?public class Test implements Runnable{ public static void main(String[] args){ Thread t = new Thread(this); t.start(); } public void run(){ System.out.println("test"); }}

TRUE ANSWER : ?
YOUR ANSWER : ?