Conditional Expressions

variable = (condition) ? (true action) : (false action);

 ... is the same as ...

if (condition) {
    variable = true value;
} else {
    variable = false action;
}
 

Back to Java slides
Home

Internet II: Day 2