I was thinking if we could use 'or' or anything like that in Java Eclipse Android Development when I write this code
if (strName.contentEquals("Hi" or "Hello") { }
Can I do something like this?
Use Conditional-OR (||) operator as below...
if (strName.equals("Hi") || strName.equals("Hello")) { }
Where, || means OR.
||
OR
Use Conditional-OR (||) operator as below...
Where,
||
meansOR
.