Question: please help me Problem 2 - Threads and Semaphores Write a java program that prints out the following paragraph: Hello all Where did you go?
please help me

Problem 2 - Threads and Semaphores Write a java program that prints out the following paragraph: Hello all Where did you go? You are late! Stay safe Goodbye all The paragraph is to be printed by three separate threads One, two and Three. The lines designated for printing by each thread are as follows: tOne Where did you go? Stay safe Two: You are late! Goodbye all tThree: Hello all In order to make this possible, you will need to use the Semaphore class available in java. Create the needed semaphores in main and pass them to the thread objects through the constructors. Use these shared semaphores to synchronize the execution of the printing statements in the run method of each class so that the final output is the paragraph in the correct order of lines
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
