java ternary operator

Java
booleanExpression ? expression1 : expression2;Object myObject = booleanExpression ? valueIfTrue : valueIfFalse;
Source

Also in Java: