Question 161Asked in DSSSB TGT Computer Science, 24 Jun 2023, Shift 3 (4:30 PM)
Which of the following is FALSE about packages?
APackages cannot provide controlled access.
BPackages are used to prevent naming conflicts.
CPackages are considered data encapsulation.
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)