I guess that shows how uniformly the convention is followed that I wasn't aware of that! I remember finding a class in a PR that had been renamed without renaming the file, and we were surprised it compiled. It must not have been a public class.
$ echo "class Bar { }" > Foo.java
$ javac Foo.java
$ ls
Bar.class Foo.java
$