Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Conditions

Status
Not open for further replies.

mfalomir

Technical User
Feb 6, 2003
78
MX
Im having a problem with an if statement (lame i know), I have this:

String callingNum = call.getName(); //Which obviusly returns a String :)

and then... I have

String numToMatch = "6655560583";

if ( callingNum == numToMatch )
{
// code
} else {
//code
}

And no matter the calling number is the correct for the match keeps on going to the else code...

What am i doing wrong ? :)

Thanks in advanced
 
Nevermind, I just found the solution, I just had to use String.equal for string comparison duh! hehehe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top