>     if (user == "admin")
>     {
>     }
>
> then it doesnt go into this condition, but goes into the ELSE instead!!!
>
> Why is this?

You need to do some basic Java study.

The conditional test above actually asks this:
If
    the explicit String type object reference 'user' points to the same
object as that
    pointed to by the implicit String type object reference "admin"

then
    do the following.

To do what you want you must write the test like this:

if (user.equals("admin"))
{

}
else
{

}

Check the JDK API Docs - you cannot program in Java without looking at and
learning from this.


Reply via email to