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

Which of the following provides a storage mechanism for incoming mail but does not allow a user to download messages selectively? Which of the following is not a sequence storage device? Which of the following is lattice command for producing a scatterplot? What is the purpose of the Form class in C# Windows Forms Applications? What is the purpose of the ActionLink helper method in ASP.NET MVC?