Broadcom-VMware
2V0-72.22 · Question #15
Refer to the exhibit. How can a response status code be set for No Content (204)? (Choose the best answer.)
The correct answer is B. Annotate the update() handler method with @ResponseStatus(HttpStatus.NO_CONTENT). See the full explanation below for the reasoning.
Question
Refer to the exhibit. How can a response status code be set for No Content (204)? (Choose the best answer.)
Exhibit
Options
- AAnnotate the update() handler method with @PutMapping("/store/orders/{id"}",
- BAnnotate the update() handler method with @ResponseStatus(HttpStatus.NO_CONTENT).
- CAnnotate the update() handler method with @ResponseEntity(204).
- DThe update() handler method cannot return a void type, it must return a ResponseEntity type.
How the community answered
(46 responses)- A11% (5)
- B80% (37)
- C7% (3)
- D2% (1)
Community Discussion
No community discussion yet for this question.
