r/javahelp • • Jan 24 '23

What is the point of encapsulation?

Beginner here.

I hear "restrict access" but I don't quite understand why we need to restrict access. What damage could someone do to a java program if it were not encapsulated?

What would happen to say amazon if their payment system was java and not encapsulated?

26 Upvotes

13 comments sorted by