MCQs
Total Questions : 22
| Page 3 of 3 pages
Question 21. Given the code. What will be the result?public class Test implements Runnable{ public static void main(String[] args) throws InterruptedException{ Thread a = new Thread(new Test()); a.start(); System.out.print("Begin"); a.join(); System.out.print("End"); } public void run(){ System.out.print("Run"); }}
Answer: Option E. -> "BeginRunEnd" is printed.
Answer: Option E. -> "gogogo" is printed