Instructions
- 1. Your final score will reflect your grasp of the concepts—approach each question with precision.
- 2. Thoroughly review each solution before proceeding to ensure full understanding.
- 3. Final results will be available after submission to provide insights into areas for further improvement.
- 4. Maintain academic integrity—plagiarism undermines learning and professional growth.
- 5. Once submitted, responses are final, so ensure you’re confident in your answers.
- 6. These challenges are designed to test practical knowledge; apply your skills as you would in real-world scenarios.
All Problems
Question
Action
1. What is the main advantage of using an Executor service in Java?
2. Which of the following is used to create a thread pool in Java?
3. Which of the following is the correct way to synchronize a method?
4. What is the purpose of the wait() method in Java?
5. What does the notify() method do in synchronization?
6. Which keyword is used to define a critical section in Java?
7.What does the invokeAll() method of ExecutorService do?
8. Which method would you use to submit multiple tasks and wait for all to complete?
9. Which is the best approach for scheduling tasks to run periodically?
10. What does the shutdownNow() method do in the ExecutorService?