Access Modifiers in Java, Access Specifiers in Java, How Many Access Modifiers available in Java, What is the use of Access Specifiers in Java
The java offers several techniques for making the trustful applications, one of the technique is "Encapsulation". The Encapsulation Technique provide the surity to access only the methods outside the class not the data members of the class so, it is minimize the lost of data accedently, these techniques is possible with the help of access specifiers or access modifiers. These are enables to prevent the unauthorized access of data.
List of Access Specifiers and their availability
The java offers several techniques for making the trustful applications, one of the technique is "Encapsulation". The Encapsulation Technique provide the surity to access only the methods outside the class not the data members of the class so, it is minimize the lost of data accedently, these techniques is possible with the help of access specifiers or access modifiers. These are enables to prevent the unauthorized access of data.
List of Access Specifiers and their availability
Modifiers | Class | Class Variables | Methods | Method Variables |
public | yes | yes | yes | no |
private | no | yes | yes | no |
protected | no | yes | yes | no |
default | yes | yes | yes | no |
final | yes | yes | yes | yes |
abstract | yes | no | yes | no |
strictfp | yes | no | yes | no |
transient | no | yes | no | no |
synchronized | no | no | yes | no |
native | no | no | yes | no |
volatile | no | yes | no | yes |
static | yes | yes | yes | no |
{ 0 comments... read them below or add one }
Post a Comment