Question: what is the difference between public and default access specifier in java?
Answer: default access specifier is for the access only in the package itself. For the classes and class members inside the package. public access specifier gives you permission to access it from anywhere inside as well as outside the package.