Having a slight problem with the following block of code:
newusr = c.readLine("New user? ");
if (newusr == "y") {
System.out.println("IF");
usnm = createNewUser();
usnm = loginToClient();
}
else {
System.out.println("ELSE");
usnm = loginToClient();
}
Basically, when i enter the single character "y" to the prompt, it takes me to the else case and thusly straight to the loginToClient method. What's going on; is the "y" in a different encoding or something?
c is a console.