+ 1
Whats the point of limiting accessibility using Private and Protected?
Is this to prevent hackers or something? I understand how it works but not why its used.
4 Réponses
0
So from my understanding when you work with someone, but have different assignments, your code can be messed up by that person, without them touching your class directly?
+ 1
Hiding Data from who? Only you have access to your code right
+ 1
Yes.Java has some principles called OOP(object oriented programming).one of the OOP concepts is Encapsulation (hiding code from misuse or limiting scope of a piece of code).