title: Using Intent in an Android application to show another activity
body: <p>In my Android application, I have two activity classes.  I have a button on the first one and I want to show the second when it is clicked, but I get an error.  Here are the classes:</p>
  
  <pre><code>public class FirstActivity extends Activity {
  
    @Override
    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      Button orderButton = (Button)findViewById(R.id.order);
  
      orderButton.setOnClickListener(new View.OnClickListener() {
  
        @Override
        public void onClick(View view) {
          Intent intent = new Intent(FirstActivity.this, OrderScreen.class);
          startActivity(intent);
        }
  
      });
    }
  }
  </code></pre>
  
  <p>The second class that should show when the button is clicked, but never does:</p>
  
  <pre><code>public class OrderScreen extends Activity {
  
    @Override
    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.order);
  
      Button orderButton = (Button) findViewById(R.id.end);
  
      orderButton.setOnClickListener(new View.OnClickListener() {
  
        @Override
        public void onClick(View view) {
          finish();
        }
  
      });
    }
  }
  </code></pre>
  
  <p>How do I create a button that will show the second activity?</p>