title: Opening a new activity based on the radio button checked in android
body: <p>I am making a project on android.I'm still a beginner in android app development. I have a go button which on clicking,will direct me to the new activity based on the radio button checked. I have 5 radio buttons and after selecting one and pressing the go button, it should go to the new activity.
  Problem is that On loading the app on my phone, the radio buttons are working as they show up when i click one of the options but when i click go,nothing happens.The code is below:</p>
  
  <p>JAVA code (India.java)</p>
  
  <pre><code>package com.example.android.travelindia;
  import android.content.Intent;
  import android.os.Bundle;
  import android.support.v7.app.AppCompatActivity;
  import android.view.View;
  import android.widget.Button;
  import android.widget.RadioButton;
  
  public class India extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_india);
          this.finish();
         final RadioButton beach = (RadioButton) findViewById(R.id.radio1);
         final RadioButton hillstation = (RadioButton) findViewById(R.id.radio2);
         final RadioButton wildlife = (RadioButton) findViewById(R.id.radio3);
         final RadioButton historical = (RadioButton) findViewById(R.id.radio4);
         final RadioButton reli = (RadioButton) findViewById(R.id.radio5);
  
         final Button go = (Button) findViewById(R.id.button1);
          go.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  if (beach.isChecked()) {
                      Intent Intents= new Intent(India.this, sands.class); // &lt;----- START "BEACHES" ACTIVITY
                      startActivity(Intents);
                      setContentView(R.layout.activity_sands);
                      }
                  else if (hillstation.isChecked()) {
                          Intent Intentm = new Intent(getApplicationContext(), mountains.class); // &lt;----- START "HIll STATIONS" ACTIVITY
                          startActivityForResult(Intentm, 0);
                      }
                  else if (wildlife.isChecked()) {
                          Intent Intentw = new Intent(getApplicationContext(), forests.class); // &lt;----- START "WILDLIFE" ACTIVITY
                          startActivityForResult(Intentw, 0);
                      }
                  else if (historical.isChecked()) {
                          Intent Intenth = new Intent(getApplicationContext(), history.class); // &lt;----- START "HISTORICAL MONUMENTS" ACTIVITY
                          startActivityForResult(Intenth, 0);
                      }
                  else if (reli.isChecked()) {
                          Intent Intentr = new Intent(getApplicationContext(), religious.class); // &lt;----- START "RELIGIOUS LOCATIONS" ACTIVITY
                          startActivityForResult(Intentr, 0);
                      }
                  }
              });
  
         }
  }
  </code></pre>