! operator in if statements java code example Example: condition operator in java b = (a == 1) ? 20: 30;