Question: JAVA CODE (THREADS) Java Threads Develop a thread call it MyThread that has one property the name and the run method. The run method should

JAVA CODE (THREADS)
JAVA CODE (THREADS) Java Threads Develop a thread call it MyThread that

Java Threads Develop a thread call it MyThread that has one property the name and the run method. The run method should print the thread name and the current time for 3 times. Write the main function to create 10 threads, given them the names from Thread1 to Thread10, run them all and wait till they all finished. A sample run is given below: Thread Non Teb IS 00:59:51 GST 9021 Theedo 1o Peb 15 00:65:62 GST Threadlo Mon Feb 15 00:59:55 GST 300 Threadlo - Mon Feb 16 00:59:51 GST 2001 Thread: Mon Teb 15 00:53:51 GST 2021 Thread: Won Teb 18 00:09:01 GST 2021 Thread Hon Feb 15 00:59:51 ST 3031 Thread Mon Tel 15 00:55:62 GST 20L Thread : Mon Teb 15 00:55:52 GST 9021 Thread Hon Teb 15 00:13:51 GST 2021 Threads Montes IS 00:59:51 GST 2021 Theed Mon Feb 18 00:59.61 87 2001 Thread Won T IS 00:59:53 GST 9021 Thread: Mon Teb IS 00:55:51 GST 2021 Thread: Mon Teb 15 00:35:62 GST 2021 Threads Hon Feb 18 00:09.61 2022 Thread Mon Feb 15 00:59:53 GST 9001 The ads Mon Teb IS 00:55 GST 2021 Thread: Mon Ted LS 00:03:51 GST 2021 Thesd. Monteb 15 DO 03:51 GST 2021 Theead? Mon reb Ls 00:89.51 cT 2021 The Hor Teb 16.00 89:62 ST 301 Thread Non Feb 15 00:53:62 GST 3021 Thread: Mon Tab IS 00:59:51 GST 2021 Thesda . Henteb 15 00:59:01 GST 3021 Threads: Hon Veb 18 00:89:61 87 2022 The Mon Feb 15 00:59:53 GST 9001 Thread: Mon Teb 16 00:55:62 GST 2001 Thread: Mon Teb 15 00:05:53 GST 9021 ThreadaMonteb 18 00:03:51 GST 302

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!