Why the filename must match the public class name
The Java compiler and JVM need a clear way to find and load the correct class.When a class is declared as public, it means it can be used by any other class or program.So Java expects that:
The public class name and the file name are the same.
This...
javawithshritej.hashnode.dev2 min read