Skip to content

Latest commit

 

History

History
16 lines (5 loc) · 579 Bytes

README1.md

File metadata and controls

16 lines (5 loc) · 579 Bytes

Concepts on access specifiers:

Controls the access of class members.Various types of access specifiers are:

Private:Allows a class to hide its member variables and member methods from other classes.In the case of previous example,score variable can be declared private as it can be accessed anywhere in that class,but it is not accessible to other classes.

Public:Accessed by the classes within the package and outside the package.

Protected:Members of this class can be accessed by all the classes within the package.It is an important keypoint about inheritance.