title: androidError:(18, 18) error: Adapter is abstract; cannot be instantiated
body: <p>I am a newbie android developer.
  I was trying to build an android application that displays an image slider.
  I used 'Adapter' and tried to instantiate the Adapter object 'adapter'.
  However, error message pop out, said, 'Error:(18, 18) error: Adapter is abstract; cannot be instantiated.'.
  I had searched the solution for this problem, and someone in Stackoverflow said to instantiate Adapter, first the Adapter class should inherited PageAdapter class. I did as following, however, same error is appearing yet. What is wrong with my code?
  Below is the 'Adapter.java', the code for Adapter class. </p>
  
  <pre><code>package com.example.clee.tutorial9;
  
  import android.content.Context;
  import android.support.v4.view.PagerAdapter;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.ImageView;
  import android.widget.LinearLayout;
  import android.widget.TextView;
  
  
  public class Adapter extends PagerAdapter {
  
  private int[] images= {R.drawable.one, R.drawable.two, R.drawable.three};
  //one, two, three are the name of the images.
  
  private LayoutInflater inflater;
  private Context context;
  
  public Adapter(Context context){
      this.context= context;
  }
  
  @Override
  public int getCount() {
      return images.length;
  }
  
  @Override
  public boolean isViewFromObject(View view, Object object) {
      return view==((LinearLayout) object);
  }
  
  @Override
  public Object instantiateItem(ViewGroup container, int position){
      inflater= (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View v= inflater.inflate(R.layout.slider, container, false);
      ImageView imageview= (ImageView) v.findViewById(R.id.imageView);
      TextView textview= (TextView) v.findViewById(R.id.textView);
      imageview.setImageResource(images[position]);
      textview.setText((position +1) + "image.");
      container.addView(v);
      return v;
     }
  
  @Override
  public void destroyItem(ViewGroup container, int position, Object object){
      container.invalidate();
     }
  }
  </code></pre>
  
  <p>And this is the code of 'MainActivity.java'.</p>
  
  <pre><code>package com.example.clee.tutorial9;
  
  import android.support.v4.view.ViewPager;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.widget.Adapter;
  
  
  public class MainActivity extends AppCompatActivity {
  
  Adapter adapter;
  ViewPager viewPager;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      viewPager= (ViewPager) findViewById(R.id.view);
      adapter= new Adapter(this);
      viewPager.setAdapter(adapter);
      }
  }
  </code></pre>
  
  <p>Errors are found in 19th and 20th statement of 'MainActivity.java'.
  To sum up, I have two errors in the code.</p>
  
  <ol>
  <li><p>Adaper is abstract: cannot be instantiated.</p></li>
  <li><p>incompatible type: Adapter cannot be converted to PageAdapter.</p></li>
  </ol>