Question 161Asked in DSSSB TGT Computer Science, 24 Jun 2023, Shift 3 (4:30 PM)

Which of the following is FALSE about packages?

  1. APackages cannot provide controlled access.
  2. BPackages are used to prevent naming conflicts.
  3. CPackages are considered data encapsulation.
  4. DPackages are used to prevent naming conflicts, and packages are considered data encapsulation.
Show answerHide answer

Correct answer: (A) Packages cannot provide controlled access.

Explanation

Packages do provide controlled access through package-private (default) and protected access. They also prevent naming conflicts and support encapsulation.

From DSSSB TGT Computer Science PYQ, 24 Jun 2023, Shift 3 (4:30 PM)

This is question 161 of DSSSB TGT Computer Science PYQ, 24 Jun 2023, Shift 3 (4:30 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.