The compiler won't let me declare more than one class as "public". Am i correct in understanding that this is a java restriction ? This means i need to create a new file, for each public class that i want in a package ? The rest of the classes without access modifier will all be package-private. (Q has been asked before probably, but my search could not be narrowed).
posted 3 years ago
N Sam wrote:Hi,
The compiler won't let me declare more than one class as "public".
Correct, unless the public class is an inner class.