I could use some help to figure out a problem with the if-clause, even if I type add as the first word in userInput, the if-clause returns false for some reason.
Scanner scanner = new Scanner(System.in);
String userInput = scanner.nextLine();
String[] splitUserInput = userInput.split(" ");
if(splitUserInput[0] == "add")
return true;
Aucun commentaire:
Enregistrer un commentaire