Could someone please help me make sense of this ternary operator. I checked the web and couldn't find any examples to clear it up for me. All the examples I saw included only one boolean expression followed by expression1 : expression 2.
int x = 5;
System.out.println(x > 2 ? x < 4 ? 10 : 8 :7);
It looks like it is ( booleanExpression ? booleanExpression ? not sure here : expression1 : expression2 )