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

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

php - facebook and github login HWIOAuthBundle and FOSUserBundle in Symfony2.1 -

hadoop - Sqoop installation export and import from postgresql -