Question: 1 public class TaskThreadDemo { 2 public static void main ( String args [ ] ) { 3 String [ ] sa = {
public class TaskThreadDemo public static void main String args String sa aX; for String s: sa Runnable ps new PrintChar s; Thread ts new Thread ps s; tsstart; end for each character end main end class TaskThreadDemo class PrintChar implements Runnable String ch; int times; public PrintC XM har String c int n times n; end constructor public void run for int i ; i times; i System.out.print ch; end for loop end method run end class PrintChar ch C;
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
