Key Concepts

Review core concepts you need to learn to master this subject


boolean condition1 = true; if (condition1){ System.out.println("condition1 is true"); } else{ System.out.println("condition1 is not true"); } // Prints: condition1 is true

In Java, an if-then-else statement controls the execution of code by providing to execute when the value in the if-then statement is false.

Conditionals and Control Flow
Lesson 1 of 2

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo