'Java File Naming [duplicate]
I'm new to Java. I want to know why Java doesn't give an error and lets the compiler compile it when I write as class class-name without public and giving the file name different from that class name. When I add public before class and then giving the different file name from class name, it gives me error. Why does that happen?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
