nerdexam
GIAC

GSSP-JAVA · Question #140

Which of the following statements about ServletContext attributes is true?

The correct answer is B. They are not thread-safe but can be made thread-safe by applying a lock on the context. See the full explanation below for the reasoning.

Question

Which of the following statements about ServletContext attributes is true?

Options

  • AThey are not thread-safe but can be made thread-safe by synchronizing the service()
  • BThey are not thread-safe but can be made thread-safe by applying a lock on the context.
  • CThey are thread-safe.
  • DThey are not thread-safe but can be made thread-safe by applying a lock on the servlet.

How the community answered

(34 responses)
  • A
    6% (2)
  • B
    79% (27)
  • C
    12% (4)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full GSSP-JAVA Practice