This question already has an answer here:
- How do I compare strings in Java? 23 answers
I'm starting to program an app in Android Studio with Java. I have arrived to a point where I have two EditText fields empty. I copy their values to two strings 'a' and 'b' using getText.toString(), so now I have:
String a = ""
String b = ""
Even with that, when I run my app, it still doesn't enter the if block.
I have tried to Debug my app, here you can see a Debug status screenshot, where you can see that both variables are emtpy, but it still doesn't enter the if block.
Can anyone help me to solve it? I'm sure it should be working, but I think I'm skipping something :s
Thank you! :D
Aucun commentaire:
Enregistrer un commentaire