Back to Intellij Community

ClassNameDiffersFromFileName

java/java-impl/resources/inspectionDescriptions/ClassNameDiffersFromFileName.html

2025.3-rc-2256 B
Original Source

Reports top-level class names that don't match the name of a file containing them.

While the Java specification allows for naming non-public classes this way, files with unmatched names may be confusing and decrease usefulness of various software tools.