This question already has an answer here:
- How do I compare strings in Java? 23 answers
Whatever i do, i never get the statement true. Please help me. This is my code
for (int i = 0; i < jArray.length(); i++) {
JSONObject e = jArray.getJSONObject(0);
emailET = (EditText) findViewById(R.id.email);
emailET.setText(e.getString("email"));
//String apa = e.getString("email");
//Toast.makeText(this,apa,Toast.LENGTH_LONG).show();
if(emailET.getText().toString()==apa){
cekLogin = true;
Toast.makeText(this,"aaaaaaaaaaaaaaaaaaaaaaaaa",Toast.LENGTH_LONG).show();
}
}
Aucun commentaire:
Enregistrer un commentaire