Java – what is the purpose of the access modifier
•
Java
Do you need access modifiers in your programming language?
Solution
See: encapsulation (Wikipedia)
Of course, you can declare all members and methods private, but you get a very useless class because you can't access any of them from another class
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码