0
What is the difference between access modifier private and access modifier public
2 ответов
+ 7
If you declare any variable with public modifier, then *all* methods (functions) will be able to access that variable's value.
But if you declare any variable with private modifier, then only the methods (functions) of the same class can access that variable's value.
+ 3
Here is best explanation
https://www.sololearn.com/post/76073/?ref=app