Scanner class doesn't work how I expected.
Scanner in = new Scanner(System.in); // input: total
String str = in.nextLine(); // total
System.out.println(str); // total
System.out.println(str == "total"); // false
System.out.println(str != "total"); // true
I expected line 5 being true, but the above code is what i got.
How should I do for (str == "total") becomes true?