Java Programming: Conditional Evaluation

Expected Duration
Lesson Objectives
Course Number
Expertise Level


This 12-video course addresses the conditional control structures available in Java by examining the three types of control structures in Java: if/else/else if, ternary operator, and switch. In this course, participants will examine how to use loops to iterate through multiple values/objects and repeatedly run specific code blocks. First, you will learn simple if constructs, which evaluate a condition to determine the flow of program control. You will then study how if-else statements provide a ladder to complex nested conditions and how an if-else statement can lead to bugs. Next, learn what makes the switch construct an easy way to dispatch execution to different parts of code based on the value by byte, short, char, and int primitive data types. Learn how to use a switch station for branching program control based on different values of a single variable, and how to pick a switch statement to avoid bugs. Finally, participants will learn to identify situations in which multiple variables need to be taken into consideration, and how to deploy nested if-else control structures.

Expected Duration (hours)

Lesson Objectives

Java Programming: Conditional Evaluation

  • discover the key concepts covered in this course
  • modify control flow in a program using the if construct
  • use the else clause to provide an alternate code path to control program flow
  • demonstrate additional applications of using the else clause to provide an alternate code path to control program flow
  • use nested if-else conditions to deal with mutually exclusive conditions
  • use nested if-else clauses to deal with more complex combinations of user input
  • use strings in if-else constructs, relying on the .equals method and avoiding the == operator
  • use the switch construct rather than nested if-else statements to control program flow
  • use the default keyword to deal with unexpected values in switch evaluation
  • use enums (enumerated types) along with switch statements
  • use string variables in switch statements
  • summarize the key concepts covered in this course
  • Course Number:

    Expertise Level