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

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

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