error at opening another activity? : Simply Im trying to open another activity when I click to btnFemale button and btnMale button.Now btnfemale button is works well but btnMale button doesnt work.


   

    public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);


        Button BtnFemale = (Button)findViewById(R.id.btnFemale);
        final Button BtnMale = (Button) findViewById(R.id.btnMale);

        BtnFemale.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getApplicationContext(),ActivityTwo.class);
                startActivity(intent);



                BtnMale.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v){

                        Intent intent = new Intent(getApplicationContext(),ActivityThree.class);
                        startActivity(intent);
                    }
                    });

                ;

            }
        });
    }
}
