Senin, 02 Januari 2017

What is access control for classes and variables in java

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 What is access control for classes and variables in java appeared first on Coding Security.


What is access control for classes and variables in java
read more

Tidak ada komentar:

Posting Komentar