The public access modifier is the most accessible access modifier. It means that the class, method, or field can be accessed from anywhere in the program.
The protected access modifier is more accessible than the default access modifier. It means that the class, method, or field can be accessed from anywhere in the package in which it is declared, and from any subclass of the class in which it is declared.
The default access modifier is less accessible than the protected access modifier. It means that the class, method, or field can be accessed from anywhere in the package in which it is declared.
The private access modifier is the least accessible access modifier. It means that the class, method, or field can only in the class in which it is declared.