How do you achieve encapsulation by using class?

1 answer

Answer

1153357

2026-04-19 04:00

+ Follow

By making fields private. That way, they can't be directly accessed from the outside - the are hidden, that is, encapsulated.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.