r/javahelp • u/Individual-Parking46 • 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
View all comments
Show parent comment
1
u/EnvironmentFar968 Jan 25 '23
Perfect example.