how do i compare password and confirm password? please help me out : here is the code please help out.I am getting error in [final EditText etregpassword = (EditText)findViewById(R.id.etregpassword);]and please help me out with the comparsion of password and confirm password and to display the error in password miss match.thank you!!

public class RegisterActivity extends AppCompatActivity {

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

        final EditText etregname = (EditText)findViewById(R.id.etregname);
        final EditText etregemailid = (EditText)findViewById(R.id.etregemailid);
        final EditText etregpassword = (EditText)findViewById(R.id.etregpassword);
        final EditText etconfirmregpassword = (EditText)findViewById(R.id.etconfirmregpassword);
        final Button regbutton = (Button) findViewById(R.id.regbutton);

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

                final String User_name = etregname.getText().toString();
                final String Email_id = etregemailid.getText().toString();
                final String Password = etregpassword.getText().toString();
                final String Confirm_password = etconfirmregpassword.getText().toString();

                Response.Listener<String> responseListner = new Response.Listener<String>(){

                    @Override
                    public void onResponse(String response) {
                        try {
                            JSONObject jsonObject = new JSONObject(response);
                            boolean SUCCESS = jsonObject.getBoolean("success");

                            if(SUCCESS){
                                Intent intent = new Intent(RegisterActivity.this,LoginActivity.class);
                                RegisterActivity.this.startActivity(intent);
                            }

                            else{
                                AlertDialog.Builder builder = new AlertDialog.Builder(RegisterActivity.this);
                                builder.setMessage("Register Failed")
                                    .setNegativeButton("Retry",null)
                                        .create()
                                         .show();

                            }

                        } catch (JSONException e) {
                            e.printStackTrace();
                        }

                    }
                };

                RegisterRequest registerRequest = new RegisterRequest(User_name,Email_id,Password,Confirm_password,responseListner);
                RequestQueue queue= Volley.newRequestQueue(RegisterActivity.this);
                queue.add(registerRequest);
            }

        });


    }

}