Yes, it works because the java compiler does not believe that it saves the file name or not, except that our class, which has public information, we can save any name or empty, but when we ever try to execute, we should use our class name because jvm creates the bytecode ourclassname.class , so we use
java className
Chandu d
source share