Java Developer Mock Interview

Master 20 Java Developer interview questions covering OOP, Spring, multithreading, and system design.

Question 18 of 20

When programming in Java, can you have an empty catch block?

  • How to Answer

  • Example Answer

  • Community Answers

William Swansen
William Swansen

William Swansen has worked in the employment assistance realm since 2007. He is an author, job search strategist, and career advisor who helps individuals worldwide and in various professions to find their ideal careers.

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 interviewer needs additional information or wants to explore the topic in more detail. Your answer to this question can sound something like this: "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."

Unlock All 20 Java Developer Questions

Unlock expert responses to technical questions that reveal your Java expertise.

Get Started