+ 1
[Solved]Somewhat lost on how to compare string input to a literal.
https://code.sololearn.com/cz2nlzj77wtd/?ref=app Somewhat get the feeling that "next()" might be inserting an escape character or something, but im lost.
3 Answers
+ 3
in java you cannot use == to compare strings... you must use equals() method:
https://www.javatpoint.com/java-string-equals
+ 3
== compares object references . If you want to compare values use equals method .
+ 2
Well, now i miss Python lol, thanks for helping out!