Lecture 15
15
test ? x : y
•
Has value x if test is true, else has value y
•
•
•
•
•
same as
if (a > b) {
max = a;
}
else {
max = b;
}
max = ( a > b ) ? a : b;