What is if not equal statement in beanshell ? if this is equal :
if ("myVarValue".equals(vars.get("MY_VARIABLE")))
What is if not equal statement in beanshell ? if this is equal :
if ("myVarValue".equals(vars.get("MY_VARIABLE")))
Use the ! unary boolean logical complement operator:
if (!"myVarValue".equals(vars.get("MY_VARIABLE")))
The type of the operand expression of the unary
!operator must bebooleanorBoolean, or a compile-time error occurs. The type of the unary logical complement expression isboolean.At run time, the operand is subject to unboxing conversion if necessary; the value of the unary logical complement expression is
trueif the (possibly converted) operand value isfalseandfalseif the (possibly converted) operand value istrue.
Another option for testing if (!something) is to test if (something == false).