Exception Handling & Validation interview questions

15 Exception Handling & Validation questions from the Spring bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

1. What is @ExceptionHandler?

Mid
  1. A.an annotation marking a method that handles a specific thrown type raised by controller actions
  2. B.an annotation triggering Bean Validation constraint checks on an incoming argument before the handler runs
  3. C.an annotation that maps an exception or handler to a specific HTTP status code returned to the client
  4. D.the Jakarta standard, using constraints like @NotNull and @Size, for declaratively checking object state

Answer + AI explanation with Pro

2. Which term means: "an annotation marking a method that handles a specific thrown type raised by controller actions"?

Mid
  1. A.@ExceptionHandler
  2. B.@Valid
  3. C.@ResponseStatus
  4. D.Bean Validation

Answer + AI explanation with Pro

3. Which statement is correct?

Mid
  1. A.@ExceptionHandler — an annotation marking a method that handles a specific thrown type raised by controller actions
  2. B.@ExceptionHandler — an annotation that maps an exception or handler to a specific HTTP status code returned to the client
  3. C.@ExceptionHandler — the Jakarta standard, using constraints like @NotNull and @Size, for declaratively checking object state
  4. D.@ExceptionHandler — an annotation triggering Bean Validation constraint checks on an incoming argument before the handler runs

Answer + AI explanation with Pro

4. What is @ControllerAdvice?

Mid
  1. A.an annotation marking a method that handles a specific thrown type raised by controller actions
  2. B.an annotation declaring a class whose handlers and model tweaks apply globally across all controllers
  3. C.an annotation that maps an exception or handler to a specific HTTP status code returned to the client
  4. D.an annotation triggering Bean Validation constraint checks on an incoming argument before the handler runs

Answer + AI explanation with Pro

5. Which term means: "an annotation declaring a class whose handlers and model tweaks apply globally across all controllers"?

Mid
  1. A.@ControllerAdvice
  2. B.@ResponseStatus
  3. C.@ExceptionHandler
  4. D.Bean Validation

Answer + AI explanation with Pro

6. Which statement is correct?

Mid
  1. A.@ControllerAdvice — an annotation that maps an exception or handler to a specific HTTP status code returned to the client
  2. B.@ControllerAdvice — an annotation marking a method that handles a specific thrown type raised by controller actions
  3. C.@ControllerAdvice — an annotation declaring a class whose handlers and model tweaks apply globally across all controllers
  4. D.@ControllerAdvice — the Jakarta standard, using constraints like @NotNull and @Size, for declaratively checking object state

Answer + AI explanation with Pro

7. What is @Valid?

Junior
  1. A.an annotation marking a method that handles a specific thrown type raised by controller actions
  2. B.an annotation that maps an exception or handler to a specific HTTP status code returned to the client
  3. C.the Jakarta standard, using constraints like @NotNull and @Size, for declaratively checking object state
  4. D.an annotation triggering Bean Validation constraint checks on an incoming argument before the handler runs

Answer + AI explanation with Pro

8. Which term means: "an annotation triggering Bean Validation constraint checks on an incoming argument before the handler runs"?

Junior
  1. A.Bean Validation
  2. B.@ExceptionHandler
  3. C.@Valid
  4. D.@ResponseStatus

Answer + AI explanation with Pro

9. Which statement is correct?

Junior
  1. A.@Valid — an annotation that maps an exception or handler to a specific HTTP status code returned to the client
  2. B.@Valid — an annotation marking a method that handles a specific thrown type raised by controller actions
  3. C.@Valid — an annotation declaring a class whose handlers and model tweaks apply globally across all controllers
  4. D.@Valid — an annotation triggering Bean Validation constraint checks on an incoming argument before the handler runs

Answer + AI explanation with Pro

10. What is Bean Validation?

Mid
  1. A.an annotation marking a method that handles a specific thrown type raised by controller actions
  2. B.an annotation declaring a class whose handlers and model tweaks apply globally across all controllers
  3. C.an annotation triggering Bean Validation constraint checks on an incoming argument before the handler runs
  4. D.the Jakarta standard, using constraints like @NotNull and @Size, for declaratively checking object state

Answer + AI explanation with Pro

11. Which term means: "the Jakarta standard, using constraints like @NotNull and @Size, for declaratively checking object state"?

Mid
  1. A.@ControllerAdvice
  2. B.@ResponseStatus
  3. C.Bean Validation
  4. D.@Valid

Answer + AI explanation with Pro

12. Which statement is correct?

Mid
  1. A.Bean Validation — an annotation that maps an exception or handler to a specific HTTP status code returned to the client
  2. B.Bean Validation — the Jakarta standard, using constraints like @NotNull and @Size, for declaratively checking object state
  3. C.Bean Validation — an annotation marking a method that handles a specific thrown type raised by controller actions
  4. D.Bean Validation — an annotation triggering Bean Validation constraint checks on an incoming argument before the handler runs

Answer + AI explanation with Pro

13. What is @ResponseStatus?

Senior
  1. A.an annotation that maps an exception or handler to a specific HTTP status code returned to the client
  2. B.an annotation triggering Bean Validation constraint checks on an incoming argument before the handler runs
  3. C.an annotation marking a method that handles a specific thrown type raised by controller actions
  4. D.the Jakarta standard, using constraints like @NotNull and @Size, for declaratively checking object state

Answer + AI explanation with Pro

14. Which term means: "an annotation that maps an exception or handler to a specific HTTP status code returned to the client"?

Senior
  1. A.@ControllerAdvice
  2. B.@Valid
  3. C.@ResponseStatus
  4. D.Bean Validation

Answer + AI explanation with Pro

15. Which statement is correct?

Senior
  1. A.@ResponseStatus — an annotation marking a method that handles a specific thrown type raised by controller actions
  2. B.@ResponseStatus — an annotation that maps an exception or handler to a specific HTTP status code returned to the client
  3. C.@ResponseStatus — an annotation declaring a class whose handlers and model tweaks apply globally across all controllers
  4. D.@ResponseStatus — an annotation triggering Bean Validation constraint checks on an incoming argument before the handler runs

Answer + AI explanation with Pro

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Exception Handling & Validation question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers