title: How to tell which button was clicked in onClick()
body: <p>I have multiple buttons in an Android app.  I want to know, in the Java code, which button was clicked.  As far as I can tell, this is accomplished with a single method like this:</p>
  
  <pre><code>public void onClick(View view) {
      // Do something
  }
  </code></pre>
  
  <p>And inside that method, you have to figure out which button was clicked.  Is that correct?</p>
  
  <p>If so, how do I tell which was clicked?  I do have the various Button objects returned by findViewById().  I just don't know how to use them to tell which button was clicked.</p>