title: Problems with OnClickListener
body: <p>read the following code.</p>
  
  <pre><code>View.OnClickListener obj_object = new View.OnClickListener() {
      public void onClick(View v) {
          Button Temp_Button = (Button) v;
          String tempButtonText= Temp_Button.getText().toString();
          String tempEdtText =  ED.getText().toString();
          ED.setText(tempEdtText + tempButtonText);
      };
  };
  </code></pre>
  
  <p>I am new in android so I created a button and I google to make an event and it successfully fired. Now I have some questions about it</p>
  
  <ol>
  <li><p>I want to cast View v to button like this Button <code>Temp_Button = (Button) v;</code> but it's not allowing me to cast in this way.</p></li>
  <li><p>why there's an function onClick(View v) because In functions in java we just write function then define body but in this case there's another function inside a function.</p></li>
  <li><p>why semi colons are there at closing brackets because semi colons not come after the closing brackets of then why here.</p></li>
  </ol>
  
  <p>I am really confused between java and the java with android.</p>