nerdexam
GIAC

GSSP-.NET · Question #151

(Topic 2) Which of the following code snippets is an example of tight encapsulation?

The correct answer is D. private int x. See the full explanation below for the reasoning.

Question

  • (Topic 2)

Which of the following code snippets is an example of tight encapsulation?

Options

  • Aprotected int x;
  • Bint x;
  • Dprivate int x;
  • Eprivate int x;

How the community answered

(29 responses)
  • A
    14% (4)
  • B
    7% (2)
  • D
    76% (22)
  • E
    3% (1)

Community Discussion

No community discussion yet for this question.

Full GSSP-.NET Practice