Design a Java program that processes integer tasks concurrently.
Unlock detailed company stats for this questionUpgrade
Your team needs a component that processes incoming tasks concurrently. Each task involves some computational work and the results need to be stored. Some tasks might fail. You receive tasks as integers from an input channel. Design a Java program that picks up these tasks, processes them concurrently, handles any failures, and then stores the successful results. Assumptions: 1. Input is an integer. 2. A task just prints the integer. 3. Handle exceptions. 4. The code must be extensible to handle any number of tasks. 5. Core: all tasks execute concurrently and a failure must not affect any other task. The interviewer was particular about concurrency, and I could only code it with threads.
Community answers
No answers contributed by the community yet.
Related courses

Course

Course
Course
