Java Multithreading Question and Answers
37. | What is the difference in using runnable and extends in threads? |
---|---|
|
|
38. | What is semaphore? |
---|---|
Semaphore is an object which helps two threads to communicate with one another in order to synchronize there operation. | |
39. | What is wait() and notify()? |
---|---|
|
|
40. | Can you explain Yielding in threading? |
---|---|
It causes the currently executing thread object to temporarily pause and allow other threads to execute. | |