Q:

If-statement dont get true, but it should

Possible Duplicate:
How do I compare strings in Java? 

I dont understand why the the first (same for other ones) if in sendMessage never gets true. The reciever String is exactly what it should be to be true?!  
When i run this and press send to Alice I get 3 Toast:

Send to Alice (=value of reciever)
[a blank toast] (=value of phoneNumber)
You have to choose a message (=nevermind this!)
public void onSend(View src){
Button b = (Button)src;

sendMessage(b.getText().toString());

}

public void sendMessage(String reciever){

String phoneNumber = "";
Toast.makeText(this, reciever, Toast.LENGTH_LONG).show();

if (reciever == "Send to Alice"){
    phoneNumber = "01230340645";
    Toast.makeText(this, "hej", Toast.LENGTH_LONG).show();
}

else if (reciever == "Send to Bob"){
    phoneNumber = "020312039";
}

else if (reciever == "Send to John"){
    phoneNumber = "0102308013";
}

Toast.makeText(this, phoneNumber, Toast.LENGTH_LONG).show();

if (_message == ""){
    Toast.makeText(this, "You have to choose a message!", Toast.LENGTH_LONG).show();
} else {
    Intent sms = new Intent(Intent.ACTION_SENDTO, Uri.parse("sms:" + phoneNumber));
    sms.putExtra("sms_body", _message);
    startActivity(sms);
    _message = "";
}

 }

A:

Don't use == to compare Strings in Java.  Use the equals method.
if (reciever.equals("Send to Alice"))...

The == operator compares references for equality, not the objects those references point to.

A:

try this....
From:
if (reciever == "Send to Alice")

To:
if (receiver.equals("Send to Alice"))

