1.

What Are The Access Specifiers Available In Java?

Answer»

Java has 4 levels of access SPECIFIERS:-

  • Private -Variables, methods CLASSES and constructors are visible only to the class.
  • Protected – Variables, methods classes and constructors are visible to the package and ALSO within all the subclasses.
  • Public - Variables, methods classes and constructors are visible ANYWHERE.
  • Default- Visible to the package and there is no specific keyword to SPECIFY this access specifier, it is declared by default.

Java has 4 levels of access specifiers:-



Discussion

No Comment Found