From the course: Learning Java 11
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Mapping out program control flow - Java Tutorial
From the course: Learning Java 11
Mapping out program control flow
- [Instructor] In the last chapter, we've looked at how we can represent data in Java using data types and variables, as well as how to input and output data. In this chapter, we are going to add some decision-making logic, that will allow our programs to have different outcomes. We saw this a little bit in the last lesson, when we printed out whatever the user inputted, but we can create more sophisticated control flow, using conditions. Let's break this down. What is a control flow? A program's control flow is the order in which the program's instructions are executed. All of the programs we've looked at so far execute one statement after the other. We created a variable, then printed the variable. Or we created one variable and then another variable and then printed them both. Each line of code was executed sequentially. For example, line one is executed before line two, line two is executed before line three and…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.