Yeah, Java doesn't support the == operator to test the equality of two strings. Duh. Anything except the basic types (int, double, etc.) is a reference type in Java. I don't know why he's complaining. He said he could have written it easily in C, which doesn't compare strings in the language proper either.
I like the way one guy put it in the comments:
"You need to use the .equals() method of String. On the good side, you never have to worry about blowing by a null terminator and rampaging through memory."
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):