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