emil gasanov wrote:Is it the same case for classes?
Yes. Classes can be declared without any access modifiers, the "default" access modifier means that this class will be visible only within current the package.
The topic Controlling Access to Members of a Class in Oracle's Java Tutorials explains exactly what the difference is between public, protected, private and no access modifier.