Object-oriented programming in Java.
It is determined by the Access level modifier that a particular field or method could be used or invoked by the other classes or not. Access control levels are as following: At the top level, which is package-private or private i.e no explicit modifier.At the member level, this is public, protected, private or package-private i.e. no explicit modifier.
With modifier public, declaration of the class might be done. In that case class becomes visible to classes,