nerdexam
GIAC

GSSP-NET · Question #188

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

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

Options

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

How the community answered

(25 responses)
  • A
    12% (3)
  • B
    8% (2)
  • C
    4% (1)
  • D
    76% (19)

Community Discussion

No community discussion yet for this question.

Full GSSP-NET Practice