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.
A.an annotation marking a method that handles a specific thrown type raised by controller actions
B.an annotation triggering Bean Validation constraint checks on an incoming argument before the handler runs
C.an annotation that maps an exception or handler to a specific HTTP status code returned to the client
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
A.@ExceptionHandler
B.@Valid
C.@ResponseStatus
D.Bean Validation
Answer + AI explanation with Pro
3. Which statement is correct?
Mid
A.@ExceptionHandler — an annotation marking a method that handles a specific thrown type raised by controller actions
B.@ExceptionHandler — an annotation that maps an exception or handler to a specific HTTP status code returned to the client
C.@ExceptionHandler — the Jakarta standard, using constraints like @NotNull and @Size, for declaratively checking object state
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
A.an annotation marking a method that handles a specific thrown type raised by controller actions
B.an annotation declaring a class whose handlers and model tweaks apply globally across all controllers
C.an annotation that maps an exception or handler to a specific HTTP status code returned to the client
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
A.@ControllerAdvice
B.@ResponseStatus
C.@ExceptionHandler
D.Bean Validation
Answer + AI explanation with Pro
6. Which statement is correct?
Mid
A.@ControllerAdvice — an annotation that maps an exception or handler to a specific HTTP status code returned to the client
B.@ControllerAdvice — an annotation marking a method that handles a specific thrown type raised by controller actions
C.@ControllerAdvice — an annotation declaring a class whose handlers and model tweaks apply globally across all controllers
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
A.an annotation marking a method that handles a specific thrown type raised by controller actions
B.an annotation that maps an exception or handler to a specific HTTP status code returned to the client
C.the Jakarta standard, using constraints like @NotNull and @Size, for declaratively checking object state
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
A.Bean Validation
B.@ExceptionHandler
C.@Valid
D.@ResponseStatus
Answer + AI explanation with Pro
9. Which statement is correct?
Junior
A.@Valid — an annotation that maps an exception or handler to a specific HTTP status code returned to the client
B.@Valid — an annotation marking a method that handles a specific thrown type raised by controller actions
C.@Valid — an annotation declaring a class whose handlers and model tweaks apply globally across all controllers
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
A.an annotation marking a method that handles a specific thrown type raised by controller actions
B.an annotation declaring a class whose handlers and model tweaks apply globally across all controllers
C.an annotation triggering Bean Validation constraint checks on an incoming argument before the handler runs
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
A.@ControllerAdvice
B.@ResponseStatus
C.Bean Validation
D.@Valid
Answer + AI explanation with Pro
12. Which statement is correct?
Mid
A.Bean Validation — an annotation that maps an exception or handler to a specific HTTP status code returned to the client
B.Bean Validation — the Jakarta standard, using constraints like @NotNull and @Size, for declaratively checking object state
C.Bean Validation — an annotation marking a method that handles a specific thrown type raised by controller actions
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
A.an annotation that maps an exception or handler to a specific HTTP status code returned to the client
B.an annotation triggering Bean Validation constraint checks on an incoming argument before the handler runs
C.an annotation marking a method that handles a specific thrown type raised by controller actions
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
A.@ControllerAdvice
B.@Valid
C.@ResponseStatus
D.Bean Validation
Answer + AI explanation with Pro
15. Which statement is correct?
Senior
A.@ResponseStatus — an annotation marking a method that handles a specific thrown type raised by controller actions
B.@ResponseStatus — an annotation that maps an exception or handler to a specific HTTP status code returned to the client
C.@ResponseStatus — an annotation declaring a class whose handlers and model tweaks apply globally across all controllers
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.