nerdexam
GIAC

GSSP-NET · Question #218

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

The correct answer is A. 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

  • Aprivate int x;
  • Bprivate int x;
  • Cpublic int x;
  • Dprotected int x;
  • Eint x;

How the community answered

(66 responses)
  • A
    77% (51)
  • B
    6% (4)
  • C
    3% (2)
  • D
    2% (1)
  • E
    12% (8)

Community Discussion

No community discussion yet for this question.

Full GSSP-NET Practice