How to compare 2 strings? Java ??

  • Replies:1
  • OpenNot stickiedUnanswered
  • Forum posts: 2

Jul 21, 2018 1:47:57 AM via Website

Android Studio 3.1.3
I'm developing in Java.

How can I compare strings?

if("1" == "1")
doesn't work but doesn't crash the app.
OK, 2 different objects.
if("1".equals("1"))
crashes the app.

Reply
  • Forum posts: 2

Jul 21, 2018 1:51:34 AM via Website

Scrap that. Sorry

Helpful?
Reply

Recommended articles