()
| 22 | } |
| 23 | |
| 24 | public void first() { |
| 25 | try { |
| 26 | System.out.println("Started Executing 1"); |
| 27 | Thread.sleep(pauseTime); |
| 28 | System.out.println("Finished Executing 1"); |
| 29 | sem1.release(); |
| 30 | } catch (Exception ex) { |
| 31 | ex.printStackTrace(); |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | public void second() { |
| 36 | try { |