android - What is wrong with the if/else code in Java? its not working -
this question has answer here:
- how compare strings in java? 23 answers
i'm trying programme in android, if/else code not working. basically, quiz application determines whether person's answers correct or not. whatever answer, output output given in 'else'.
if(message=="panama canal"){ answer="correct!"; } else { answer="totally wrong"; }
in java need compare strings equals
method. written comparing if 2 same object.
Comments
Post a Comment