String stringInput = input.nextLine();
if (stringInput.toLowerCase() == "y")
{
System.out.print("True");
}
For some reason, this If statement isn't working. I enter the letter y in the console, put it doesn't output "True". Any ideas?
Aucun commentaire:
Enregistrer un commentaire