In this article we will look at access control in Java. We will learn about four access modifiers: public, protected, default and private along with java code examples. Access Control Access control is a mechanism, an attribute of encapsulation which restricts the access of certain members of a class to specific parts of a program. Access to members of a class can be controlled using the access modifiers. There are four access modifiers in Java. They are: public protected default private If the member (variable or method) is not marked as either public or protected or private, the access modifier for that
The post How access control add security to your code in java appeared first on Coding Security.
How access control add security to your code in java
read more
Tidak ada komentar:
Posting Komentar