Skip to Main Content
Beginning Java 8 Fundamentals: Language Syntax, Arrays, Data Types, Objects, and Regular Expressions
book

Beginning Java 8 Fundamentals: Language Syntax, Arrays, Data Types, Objects, and Regular Expressions

by Kishori Sharan
June 2014
Beginner content levelBeginner
810 pages
23h 28m
English
Apress
Content preview from Beginning Java 8 Fundamentals: Language Syntax, Arrays, Data Types, Objects, and Regular Expressions

CHAPTER 5

image

Statements

In this chapter, you will learn:

  • What statements are in Java
  • About the different types of statements available in Java, for example, control flow statements, loop statements, and so on.

What Is a Statement?

A statement specifies an action in a Java program, such as assigning the sum of x and y to z, printing a message to the standard output, writing data to a file, etc.

Types of Statements

Statements in Java can be broadly classified into three categories:

  • Declaration statement
  • Expression statement
  • Control flow statement

Declaration Statement

A declaration statement is used to declare a variable. You have already been ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Java 9 Fundamentals: Arrays, Objects, Modules, JShell, and Regular Expressions

Beginning Java 9 Fundamentals: Arrays, Objects, Modules, JShell, and Regular Expressions

Kishori Sharan

Publisher Resources

ISBN: 9781430266532Purchase book