© Iuliana Cosmina 2018
Iuliana CosminaJava for Absolute Beginnershttps://doi.org/10.1007/978-1-4842-3778-6_7

7. Controlling the Flow

Iuliana Cosmina1 
(1)
Edinburgh, UK
 

The previous chapters covered ways to create statements and which operators to use. Sometimes, elements of logic were added to make the code runnable for you. This chapter is dedicated to explain how to manipulate the execution of your code using fundamental programming—conditional and repetitive statements.

A solution and an algorithm can be represented using flowcharts. Most of the programming that we’ve done until this chapter contained declaration and printing statements—simple one-step statements. Take the following piece of code.
package com.apress.bgn.ch7;
public class Main {

Get Java for Absolute Beginners: Learn to Program the Fundamentals the Java 9+ Way now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.