Conditionals and Control Flow
Conditionals and control flow in Java programs.
StartKey Concepts
Review core concepts you need to learn to master this subject
else statement
else if Statements
if statement
Nested Conditional Statements
AND Operator
NOT Operator
The OR Operator
Conditional Operators - Order of Evaluation
else statement
else statement
boolean condition1 = false;
if (condition1){
System.out.println("condition1 is true");
}
else{
System.out.println("condition1 is not true");
}
// Prints: condition1 is not true
The else
statement executes a block of code when the condition inside the if
statement is false
. The else
statement is always the last condition.
What you'll create
Portfolio projects that showcase your new skills
A Simple Car Loan Payment Calculator
It's time to build fluency in Java Control Flow. In this next Pro Project, we're going to practice conditionals in Java so you can hone your skills and feel confident taking them to the real world. Why? Mastering combining basic fundamentals such as conditionals and arithmetic expressions will help you to build effective programs. What's next? Car payment tracker, math fun, more Java. You got this!
Continents and Cities
In this Pro project, we're going to practice the switch statement in Java so you can hone your skills and feel confident taking them to the real world. 7 continents, 7 cities, 1 expression. You got this!
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory