Hi,
I suppose that user name is
string.
It means that String is an object, not
primitive (primitives start with lower case letter - int, boolean etc., classes start with upper case letter - String, Integer etc.)
"==" is used to compare primitive values, not objects.
So check the
String api and you'll find out the right way to compare
two strings (of objects) plus other very useful methods that can help you.