Android or Java class naming with $ symbol

后端 未结 2 1578
旧时难觅i
旧时难觅i 2021-02-19 10:51

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



        
2条回答
  •  无人及你
    2021-02-19 11:02

    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

提交回复
热议问题