Java Access Specifiers regulate access to field, class, and method. Also called as visibility specifiers, they determine if a method or field can be used by another method in some other class. An important part of OOP, they are also used to restrict access.

There are four types of Access Specifiers:

  • Public
  • Private
  • Protected
  • Default
BY Best Interview Question ON 13 Jan 2019