This is a quiz app in Java. I am trying to compare the answer text stored as a variable (answeredOne) to the actual answer Prophase. I cannot get them to be equal. Do you see anything wrong with this code?
EditText questionOne = (EditText) findViewById(R.id.answer_one);
String answeredOne = questionOne.getText().toString();
if (answeredOne == "Prophase") {
score = score + 1;
}
I keep getting zero when answering in the question.