Question: explain the code with the output in the box below: class MyThread extends Thread { String message; MyThread ( String message ) { this.message =
explain the code with the output in the box below:
class MyThread extends Thread
String message; MyThreadString message
this.message message;
public void run
try
forint i; i; i
System.out.printlnmessage i; Thread.sleep;
catchInterruptedException ie
public class MultipleThreadDemo
public static void main String args
MyThread t new MyThreadOne; MyThread t new MyThreadTwo; System.out.printlnt; System.out.printlnt;
tstart;
tstart;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
