java - Can I use any 'or' like word in an if else statement (in contentEquals() ) -


i thinking if use 'or' or in java eclipse android development when write code

 if (strname.contentequals("hi" or "hello") {  } 

can this?

use conditional-or (||) operator below...

if (strname.equals("hi") || strname.equals("hello")) {  } 

where, || means or.


Comments

Popular posts from this blog

android - Inheriting from Theme.AppCompat* -

broadcastreceiver - android BOOT_COMPLETED not received if not activity intent-filter -

basic authentication with http post params android -