© Kishori Sharan 2017

Kishori Sharan, Beginning Java 9 Fundamentals, https://doi.org/10.1007/978-1-4842-2902-6_6

6. Statements

Kishori Sharan

(1)Montgomery, Alabama, USA

In this chapter, you will learn:

  • What statements are

  • What declaration statements are

  • What expressions in Java are and how to convert them into expression statements

  • What a block statement is and what the scope of variables declared inside a block is

  • What control-flow statements are and how to use if-else, for-loop, while-loop, and do-while loop statements

  • How to use the break statement to exit a loop or a block

  • How to use the continue statement to ignore the rest of the body of a loop statement and continue the next iteration

  • What an empty statement is and where to use it

All examples in ...

Get Beginning Java 9 Fundamentals: Arrays, Objects, Modules, JShell, and Regular Expressions 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.