Chapter 8. Control Statements

DO OR DIE

  • To be the smooth jazz of Java chapters

Control statements are the things you write to control the flow of your program. They're pretty straightforward for the most part, and very similar to how these constructs are implemented in other languages.

So I am going to go out on a limb here. I am betting that you're going to be familiar with when and why to use stuff like if/else statements and for loops. Maybe we can spare ourselves the formality. If you're not familiar, that's okay. These are basic elements in any programming language, and there are hundreds of examples of their usage throughout the remainder of this book.

Get Java Garage 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.