Quote (carteblanche @ Sep 5 2017 09:50pm)
the syntax is:
booleanExpression ? value : anotherValue
and it evaluates to the value or anotherValue
look at your first example
boolean wasCar = isCar ? true : false;
after evaluation:
boolean wasCar = true;
now try your second example
boolean isCar ? true : false;
after evaluation:
boolean true;
does that look valid to you?
Based on what you said, yes it's valid.... i'd think...
thanks
This post was edited by ferf on Sep 6 2017 11:46am