ternary operator java

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

Also in Java: