| Share this post! | Vote this! |
|
One of the prime features of object oriented programming is data
encapsulation.This feature enables data to have restricted access.There
are currently four different access specifiers in JAVA. Namely,
Public:- All the data members and member functions which are declared public can be accessed from anywhere outside or inside the class which means it can be accessed by any object or through any member functions.It is also called a class level access modifier as class is usually made public in JAVA so that it can be accessed from anywhere. more...
- Public
- Protected
- Default
- Private
Public:- All the data members and member functions which are declared public can be accessed from anywhere outside or inside the class which means it can be accessed by any object or through any member functions.It is also called a class level access modifier as class is usually made public in JAVA so that it can be accessed from anywhere. more...




0 comments:
Post a Comment