Home / MCQ Bank / Computer
Computer Threads

What will be the output after compiling and executing the following code? 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"); } }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option C • "BeginRunEnd" is printed.

Related Computer Questions

What are the two types of monitors? Data scrubbing is which of the following? In Java, which access modifier allows a method to be accessed from any class in any package? What is the primary purpose of the "pivot" method in Pandas? __________maintain (s) database of webpages containing information on variety of topics.