Prev Question
Next Question

Which two actions will improve the encapsulation of a class?

A.
Changing the access modifier of a field from public to private

B.
Removing the public modifier from a class declaration

C.
Changing the return type of a method to void

D.
Returning a copy of the contents of an array or ArrayList instead of a direct reference

Prev Question
Next Question

Leave a Reply

Your email address will not be published. Required fields are marked *