AP Computer Science Aeasymcq1 pt

Data encapsulation protects fields by

A.making them private with public methods
B.making them public
C.removing all methods
D.making them static

Explanation

Core Concept

Controlled access preserves invariants.

Correct Answer

Amaking them private with public methods

More Unit 5: Writing Classes practice questions

Try a random question →

Practice more AP Computer Science A questions with full explanations

Practice Unit 5: Writing Classes Questions →