Why can't we define a top level class as private?
A top-level class as private would be completely useless because nothing would have access to it.
Java doesn’t allow a top level class to be private. Only 'public' or 'package'.
A top-level class as private would be completely useless because nothing would have access to it.
Java doesn’t allow a top level class to be private. Only 'public' or 'package'.