nerdexam
Oracle

1Z0-899 · Question #196

Which of following annotations can be used in a servlet class? (i) @javax.annotation.Resource (ii) @javax.annotation.PreDestroy (iii) @javax.annotation.security.RunAs (iv)…

The correct answer is C. (i), (ii), (iii) and (v). See the full explanation below for the reasoning.

Question

Which of following annotations can be used in a servlet class? (i) @javax.annotation.Resource (ii) @javax.annotation.PreDestroy (iii) @javax.annotation.security.RunAs (iv) @javax.annotation.security.RolesAllowed (v) @javax.servlet.annotation.WebServlet

Options

  • A(v) only
  • B(i) and (v)
  • C(i), (ii), (iii) and (v)
  • D(i), (ii), (iv) and (v)
  • E(i), (ii), (iii), (iv) and (v)

How the community answered

(37 responses)
  • A
    3% (1)
  • B
    8% (3)
  • C
    70% (26)
  • D
    16% (6)
  • E
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice