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
Post a Comment