exam questions

Exam 2V0-72.22 All Questions

View all questions & answers for the 2V0-72.22 exam

Exam 2V0-72.22 topic 1 question 45 discussion

Actual exam question from VMware's 2V0-72.22
Question #: 45
Topic #: 1
[All 2V0-72.22 Questions]

Refer to the exhibit.

How can a response status code be set for No Content (204)? (Choose the best answer.)

  • A. Annotate the update() handler method with @PutMapping(“/store/orders/{id”}”, HttpStatus.NO_CONTENT).
  • B. Annotate the update() handler method with @ResponseStatus(HttpStatus.NO_CONTENT).
  • C. Annotate the update() handler method with @ResponseEntity(204).
  • D. The update() handler method cannot return a void type, it must return a ResponseEntity type.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
zakupower
6 months ago
Selected Answer: B
@ResponseStatus or returning an HttpEntity
upvoted 3 times
...
ridasys
10 months ago
Selected Answer: B
http://effcode.com/spring/returning-no-content-204-from-spring-controller/
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago