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

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -