Just tried to run and I receive this error:

> 
> org.json.JSONException: Value ture at success of type java.lang.String cannot be converted to boolean
> 
> 
> at org.json.JSON.typeMismatch(JSON.java:100)
> 
> 
> at org.json.JSONObject.getBoolean(JSONObject.java:378)
> 
> 
> 

I'm a beginner with Java and I can't seem to figure out why string won't convert to Boolean.

The error code comes up specifically on the "if" line and "else if" line.

The code:

```
public class RegisterActivity extends AppCompatActivity {

private ArrayAdapter adapter;
private Spinner spinner;
private String userID;
private String userPassword;
private String userGender;
private String userMajor;
private String userEmail;
private AlertDialog dialog;
private boolean validate = false;

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

    spinner = (Spinner) findViewById(R.id.majorSpinner);
    adapter = ArrayAdapter.createFromResource(this, R.array.major, android.R.layout.simple_spinner_dropdown_item);
    spinner.setAdapter(adapter);

    final EditText idText = (EditText) findViewById(R.id.idText);
    final EditText passwordText = (EditText) findViewById(R.id.passwordText);
    final EditText emailText = (EditText) findViewById(R.id.emailText);

    RadioGroup genderGroup = (RadioGroup) findViewById(R.id.genderGroup);
    int genderGroupID = genderGroup.getCheckedRadioButtonId();
    userGender = ((RadioButton) findViewById(genderGroupID)).getText().toString();

    genderGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
        @Override
        public void onCheckedChanged(RadioGroup radioGroup, int i) {

            RadioButton genderButton = (RadioButton) findViewById(i);
            userGender = genderButton.getText().toString();

        }
    });

    final Button validateButton = (Button) findViewById(R.id.validateButton);
    validateButton.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            String userID = idText.getText().toString();
            if(validate)
            {
                return;
            }
            if(userID.equals(""))
            {
                AlertDialog.Builder builder = new AlertDialog.Builder(RegisterActivity.this);
                dialog = builder.setMessage("아이디는 빈 칸일 수 없습니다.")
                        .setPositiveButton("확인", null)
                        .create();
                dialog.show();
                return;
            }

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

                @Override
                public void onResponse(String response){
                    try
                    {
                        JSONObject jsonResponse = new JSONObject(response);
                        boolean success = jsonResponse.getBoolean("success");
                        if(success)
                        {
                            AlertDialog.Builder builder = new AlertDialog.Builder(RegisterActivity.this);
                            dialog = builder.setMessage("사용할 수 있는 아이디 입니다.")
                                    .setPositiveButton("확인", null)
                                    .create();
                            dialog.show();
                            idText.setEnabled(false);
                            validate = true;
                            idText.setBackgroundColor(getResources(). getColor(R.color.colorGray));
                            validateButton.setBackgroundColor(getResources(). getColor(R.color.colorGray));
                    }
                    else{
                            AlertDialog.Builder builder = new AlertDialog.Builder(RegisterActivity.this);
                            dialog = builder.setMessage("사용할 수 없는 아이디 입니다.")
                                    .setNegativeButton("확인", null)
                                    .create();
                            dialog.show();
                        }
                    }
                    catch (Exception e)
                    {
                        e.printStackTrace();
                    }

                }
            };
            ValidateRequest validateRequest = new ValidateRequest(userID, responseListener);
            RequestQueue queue = Volley.newRequestQueue(RegisterActivity.this);
            queue.add(validateRequest);
        }
    });

    Button registerButton = (Button) findViewById(R.id.registerButton);
    registerButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            String userID = idText.getText().toString();
            String userPassword = passwordText.getText().toString();
            String userMajor = spinner.getSelectedItem().toString();
            String userEmail = emailText.getText().toString();

            if(!validate){

                AlertDialog.Builder builder = new AlertDialog.Builder(RegisterActivity.this);
                dialog = builder.setMessage("먼저 중복 체크를 해주세요.")
                        .setNegativeButton("확인", null)
                        .create();
                dialog.show();
                return;

            }

            if(userID.equals("") || userPassword.equals("") || userMajor.equals("") || userEmail.equals("") || userGender.equals("")){
                AlertDialog.Builder builder = new AlertDialog.Builder(RegisterActivity.this);
                dialog = builder.setMessage("빈 칸 없이 입력해주세요.")
                        .setNegativeButton("확인", null)
                        .create();
                dialog.show();
                return;

            }

            Response.Listener<String> responseListener = new Response.Listener<String>(){   #########Error here

                @Override
              public void onResponse(String response){  #########Error here
                    try
                    {
                        JSONObject jsonResponse = new JSONObject(response);
                        boolean success = jsonResponse.getBoolean("success");
                        if(success)
                        {
                            AlertDialog.Builder builder = new AlertDialog.Builder(RegisterActivity.this);
                            dialog = builder.setMessage("회원 등록이 성공했습니다.")
                                    .setPositiveButton("확인", null)
                                    .create();
                            dialog.show();
                            finish();

                        }
                        else {
                            AlertDialog.Builder builder = new AlertDialog.Builder(RegisterActivity.this);
                            dialog = builder.setMessage("회원 등록에 실패했습니다.")
                                    .setNegativeButton("확인", null)
                                    .create();
                            dialog.show();
                        }
                    }
                    catch (JSONException e)
                    {
                        e.printStackTrace();
                       // Toast.makeText(getApplicationContext(), "error",
                        //        Toast.LENGTH_SHORT).show();
                    }

                }
            };
            RegisterRequest registerRequest = new RegisterRequest(userID, userPassword, userGender, userMajor, userEmail, responseListener);
            RequestQueue queue = Volley.newRequestQueue(RegisterActivity.this);
            queue.add(registerRequest);

        }
    });

}

@Override
protected void onStop(){
    super.onStop();
    if(dialog !=null)
    {
        dialog.dismiss();
        dialog = null;
    }
}

```

}