I'm reviewing a certain project and I see that there are many classes with the same name, but with a dollar ($) symbol at the end + increasing number. For example
Class.java
Class$1.java
Class$2.java
Class$n.java
OtherClass.java
OtherClass$1.java
OtherClass$n.java
What does it mean?
AFAIK if it's has number it's an anonymous inner class, if it has a name after $ sign it means just inner class.
Edit:
More about how compiler handles you can see here
The dollar sign is used by the compiler for inner classes. I thought it would be strange to manually make classes/files with those names though: As far as I know it's a compiler thing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With