Anonymous · shared experience1 Oct 2025 · 6 views
Rakuten: Read a file with layered custom exceptions
Problem. Write a Java method that reads a file and reports failures precisely: throw FileNotFoundException when the file is missing, IOException when it exists but cannot be read, and your own custom exception for anything else.
Related questions in the same round.
- Filter a list of Person objects to those older than 25 and sort them with the Stream API.
- How do you handle exceptions thrown inside a stream pipeline?
- Write a thread-safe singleton and explain volatile.
Context. A rapid-fire first round for a Java lead role that also covered SOLID, CountDownLatch and the cost of common collection operations.
Comments 0
No comments yet. Ask the author something, or add what happened in your own round.