Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What is the purpose of the ExecutorService?
Think of it as managing multiple workers.
What type of task can a Callable interface execute?
Recall that Callable can return something.
What does ExecutorService manage?
Recall its main function: managing groups of tasks.
True or False: A Callable can return a value.
Think of what a function does when it 'calls' something back.
Design a multi-threaded application using ExecutorService that processes a list of numbers and returns their squares. Explain how you would handle exceptions during execution.
Consider using a list and mapping each number to its square.
Create a scenario in which a CountDownLatch may fail and explain why. How would you prevent this from happening in your design?
Think about the logistics of timing for tasks.
6 more questions in this section. Enroll free to practise them all.
Enroll free