Which of the below exception handler methods are correct? [Choose any three]

@ExceptionHandler(Exception.class)
public ResponseEntity<String> exceptionHandler(Exception e) {

//statements
}

@ExceptionHandler(Exception.class)
public ResponseEntity<String> exceptionHandler() {

//statements
}

@ExceptionHandler()
public ResponseEntity<String> exceptionHandler(Exception e) {

//statements
}

@ExceptionHandler
public ResponseEntity<String> exceptionHandler(Exception e) {

//statements
}

Verified Answer
Correct Option - acd

To get all Infosys Certified Spring Microservices Developer Exam questions Join Telegram Group https://grateful.prepflix.in/infy-lex-pdfs

Telegram