nerdexam
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

2V0-72.22 question #15 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)
  • A
    11% (5)
  • B
    80% (37)
  • C
    7% (3)
  • D
    2% (1)

Community Discussion

No community discussion yet for this question.

Full 2V0-72.22 Practice