Question: please answer this Q using simple codes with pictures and steps this is the second time i post this Q Using an implementing an interface
Using an implementing an interface class, write a thread class that prints a thread's name every 2 seconds, 8 times, then create two child threads; name the first thread as your first name, and the second thread as your last name. The main should exit its run after running of the sixth time of the children's threads. Your output should be like the following one. New thread: Thread[Sumayya, 5 , main] New thread : Thread[Azzony, 5 , main] Sumayya : 1 Azzony : 1 Azzony : 2 Sumayya : 2 Azzony : 3 Sumayya : 3 Sumayya : 4 Azzony : 4 Sumayya : 5 Azzony : 5 Azzony : 6 Sumayya : 6 Main Thread Exiting Azzony : 7 Sumayya : 7 Azzony : 8 Sumayya : 8 Sumayya Exiting Azzony Exiting
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
