HOUR 7Using Conditional Tests to Make Decisions
This Hour’s To-Do List:
Use the
if
statement for basic conditional tests.
Test whether one value is greater than or less than another.
Test whether two values are equal or unequal.
Use
else
statements as the opposite of if
statements.
Chain several conditional tests together.
Use the switch
statement ...
Get Sams Teach Yourself Java in 24 Hours, Eighth Edition now with the O’Reilly learning platform.
O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.