Read the following main class. Try to guess what will be its output. class Test { public static void main(String s[]) throws Exception { TextThread x = new TextThread ("I am thread x"); TextThread y= new TextThread ("I am thread y");  x.start(); y.start(); System.out.println("I am Main thread"); } }

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter11: Exception Handling
Section: Chapter Questions
Problem 8RQ
icon
Related questions
Question
100%

Read the following main class. Try to guess what will be its output.

class Test {

public static void main(String s[]) throws Exception {

TextThread x = new TextThread ("I am thread x");

TextThread y= new TextThread ("I am thread y");

 x.start();

y.start();
System.out.println("I am Main thread");

} }

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Avoiding deadlock
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,