© 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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.