Using “this” with class name

前端 未结 7 1515
暗喜
暗喜 2020-11-30 18:19

I am doing Android programming and was learning about Intents, when I saw a constructor that, to my C# trained mind, seemed funky. The call was:

Intent myI         


        
7条回答
  •  长情又很酷
    2020-11-30 18:40

    ClassName.this is used to reference the current instance of an outerclass from an inner class.

提交回复
热议问题