Class 1, Part 2 |
Intro to Java 30-IT-396 |
|
Ternary Operator
The ternary operator is ? :. It take three arguments:
- if part ? true : false
- If the if part is true, the statement after the ? executes.
If it
is false, the part after the : executes.
- Take it for what it is worth. This saves typing, but is
less obvious,
so many do not use it (self included).
Comparing Multiple Statements
Constants
Advanced Topic: Ternary Operators
Advanced Topic: Bitwise Operators
Created by: Brandan
Jones January 4, 2002