JLS 13.1 indicates:
A class or interface must be named with its binary name, which must satisfy the following restrictions:
- The binary name of a top-level type (Β§7.6) is its canonical name (Β§6.7).
- [...]
- The binary name of an anonymous class (Β§15.9.5) consists of the binary name of its immediately including type, followed by $, followed by a non-empty sequence of digits.
So, theoretically, it should not start with 1, but it should be something like EnclosingClass$N , where N is a number.
source share