Make Decisions
Use conditional logic to control flow based on the input.
We'll cover the following...
We'll cover the following...
Now that Java can take input, let’s make it respond to that input. You’ll use if, else, and comparison operators in this lesson to help Java make decisions.
Goal
You’ll aim to:
Use
if
,else if
, andelse
.Compare numbers and strings. ...