conditional assignment in java code example Example: condition operator in java b = (a == 1) ? 20: 30;