Button redButton = new Button(this); What does "this" do?

0 Magnus Storjord simonsen · August 11, 2015
In the following code: 

Button redButton = new Button(this); 

Can someone explain what "this" do in the code.

Post a Reply

Replies

Oldest  Newest  Rating
0 Harsh Dalwadi · August 13, 2015
"this" is the parameter that define that the Object which you use is that belong to that function only .
  • 1

Java / Android Development

106,932 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator