android - What is wrong with the if/else code in Java? its not working -


this question has answer here:

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

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -