java - Bad operand for binary operator? -


i have no idea wrong, beginner. appreciated.

if(room.contains((targetroom1) || (targetroom2) && targetday)){

the error code bad operand types binary operator '&&' first type: java.lang.string; second type: java.lang.string

the error tells targetroom2 , targetday not booleans, cannot use &&.

i guess want test like:

if(room.contains(targetroom1) || room.contains(targetroom2) && (targetday == queryday)){ 

Comments

Popular posts from this blog

python - Installing PyDev in eclipse is failed -

PHP OOP-based login system -

c# - Nested Internal Class with Readonly Hashtable throws Null ref exception.. on assignment -