Question: Create four threads TA, TB, TC and TD where each thread is doing one thing: 1. TA prints A on the screen and, 2. TB
Create four threads TA, TB, TC and TD where each thread is doing one thing: 1. TA prints A on the screen and, 2. TB prints B on the screen and, 3. TC prints C on the screen 4. TD prints D on the screen Synchronize the threads using semaphores so that the sequence ABACDC is printed 5 times on the screen. Output must follow the required sequence with proof I want this in java code.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
