+ 2

Help a java noobster with his scanner

Why does this code never outputs one ? https://code.sololearn.com/cpU2vKnY7sBg/?ref=app

10th Apr 2019, 12:28 PM
amitz
amitz - avatar
3 Antworten
+ 10
Java noobster here too 😄👍🏻 You should use the method equals() while comparing strings 🤓 a.equals("abc") works :)
10th Apr 2019, 12:38 PM
1Lory☕
1Lory☕ - avatar
+ 2
You can also use a.contentEquals("abc")
7th May 2019, 11:25 AM
Mind To Machine 💻🕆
Mind To Machine 💻🕆 - avatar