What are the various access specifiers?

Public:- The classes, methods, or variables which are defined as public, can be accessed by any class or method.

Protected:- Protected can be accessed by the class of the same package, by the sub-class of this class, or within the same class.

Private:- The private class, methods, or variables defined as private can be accessed within the class only.

What are the various access specifiers?expoundsofttechsolution