android: String value match another String value using operand == not working?

前端 未结 5 429
生来不讨喜
生来不讨喜 2021-01-16 20:29

Hopefully this is an easy fix, but for the moment is is boggling me (Actionscript programmer new to Java programming).

I have a string variable coming from getExtra

5条回答
  •  北海茫月
    2021-01-16 20:43

    "vuqar"=="vuqar" or "vuqar"!="vuqar" not works correct

    You have to use

    if(vuqar.equals("vuqar")){//action}
    

    OR

    if(!"vuqar".equals("vuqar")){//action}
    

提交回复
热议问题