How to Answer: When programming in Java, can you have an empty catch block?
Advice and answer examples written specifically for an Amazon job interview.
4. When programming in Java, can you have an empty catch block?
How to Answer
This is an example of an operational question. Operational questions evaluate specific elements used in your job. Like technical questions, answers to operational questions should be brief and to the point. You should also anticipate follow-up questions if the Amazon interviewer needs additional information or wants to explore the topic in more detail.
Answer Example
"While you can use an empty catch block while programming in Java, it is not advised. The problem this creates involves debugging the program if the empty catch block were to catch an exception. There will not be any information about the exception. Finding the issue with no information in the log could be very time-consuming."