Skip to main content
All Questions

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

Software Engineering Interview Prep

Land your dream software engineering role at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates—practice data structures, algorithms, system design, people management, behavioral interviews, and more.

Course

System Design Interviews

Learn how to answer the latest system design questions across product, infrastructure, and AI domains. Features in-depth video examples, written breakdowns, and helpful reference patterns. Watch senior engineers and managers answer these questions in mock interview videos.