mercredi 1 avril 2015

if condition of string and editText

I'm newbie in android programming. And I'm being confused of the error in this line saying, "Incompatible operand types EditText and String"


the USERTYPE variable is a Spinner while the USER variable is an EditText



if((userType.getSelectedItem()=="Administrator")&(user=="1500110001"))
{
login();
}


Hope you could help the newbie here. Thank you in advance!


Aucun commentaire:

Enregistrer un commentaire