• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is this "this"

 
Peter Sorotokin
Ranch Hand
Posts: 36
1
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
There is a Android source code that I understand it amd know what it does except the role of "this" as a parameter to a method .
The code :


In lines 18 to 26 , what is the role of "this" ??? To which it refers ??? Is it the strange "context" ???
Thanks for your help
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"this" in Java refers to the object in which it is used, in this case to the "Audio" class. The method probably takes an Activity or a Context as parameter.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic