 <p><code>View.OnClickListener</code> is an interface which you need to implement when you want to handle click events. In your code, you are doing that by doing <code>new View.OnClickListener()</code>. Here you are actually creating an anonymous class that implements <code>View.OnClickListener</code>. And any class that implements <code>View.OnClickListener</code> must also implement all the methods declared in it (e.g. the <code>onClick</code> method). Also, in <code>public void onClick(View v) {..}</code>, the <code>View v</code> denotes the view or the button that was clicked so that you can perform whatever you want with it. For example, get it's id, change it's color etc.</p>