can you put a single statement in a ternary oeprator java code example
Example 1: java ternary operator
Object myObject = booleanExpression ? valueIfTrue : valueIfFalse;
Example 2: shorthand if java without else
if(statement1 && statement2) doSomething();