I'm getting the user input like so:
Scanner keyboard = new Scanner(System.in);
String input = keyboard.nextLine();
When I compare it like this
if(input == "abc"){
System.out.println("Match!");
}else{
System.out.println(input + "\nabc");
}
If I type "abc" I see
abc
abc
Instead of the expected match
. What's going on?