title: Error in calling of java class in android app development
body: <p>I am new to android development. This is the code I am using:</p>
  
  <pre><code>package com.example.databaseread;
  
  
  import java.util.List;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.util.Log;
  import android.view.Menu;
  import android.view.View;
  import android.widget.Button;
  
  
  
  public class MainActivity extends Activity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      final DatabaseHandler db = new DatabaseHandler(this);
  
      Button but1 = (Button) findViewById(R.id.insert);
  
      but1.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              // Inserting known Languages
              Log.d("Insert: ", "Inserting ..");
              db.add(new values("value1"));
              db.add(new values("value2"));
              db.add(new values("value3"));
              db.add(new values("value4"));
              Log.d("Insert", "DataBase Successfully Updated");
          }
      });
  
      Button but2 = (Button) findViewById(R.id.Read);
  
      but2.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              // Reading data Already present in the Database
              Log.d("Reading: ", "Reading all data..");
              List&lt;values&gt; val = db.getAllvalues();
  
              for (values cn : val) {
                  String log = "Id: " + cn.getId() + " ,values: "
                          + cn.getValue();
                  Log.d("value: ", log);
              }
          }
      });
  
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.main, menu);
      return true;
  }
  
  
  }
  </code></pre>
  
  <p>The error: </p>
  
  <pre><code>Multiple markers at this line
      - container cannot be resolved or is not a field
      - implements 
       android.view.View.OnClickListener.onClick
  </code></pre>
  
  <p>Is coming at  <code>public void onClick(View v)</code> line.</p>
  
  <p>I would be glad if anyone could help. Thanks!</p>