Hi,
I get into a weird problem that I really don't know what happen. I get the string from the vector, the string have something like this:
CreateAccount 1 2000
CreateAccount 2 3000
CreateAccount 3 3300
As you can see, I do a split on the string to get the CreateAccount out of the string, and run this comparation with "CreateAccount", and it return all false.
I tried to see whether it have space around the word, and it doesn't has any. So anyone know what happen?
for (int i = 0; i < vsize; i++)
{
String Cmd = (String)vAccounts.elementAt(i);
String splitString[] = Cmd.split(" ");
String C = parseString(splitString[1]);
//System.out.println("String: #" + C + "#");
if (C == "CreateAccount")
{System.out.println("Line " + i + ": " + Cmd); }
}
Thanks....
Mike