© Kishori Sharan 2017

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

4. Data Types

Kishori Sharan

(1)Montgomery, Alabama, USA

In this chapter, you will learn:

  • What identifiers are and the detailed rules to declare them

  • What data types are

  • The difference between primitive and reference data types

  • How to declare variables of a data type

  • How to assign a value to a variable

  • Detailed descriptions of all primitive data types in Java

  • What literals of a data type are

  • What casting is and when it is needed

  • Binary representation of integers and floating-point numbers

  • Different rounding modes for floating-point numbers

  • How Java implements IEEE floating-point standards

I use a lot of snippets of code in this chapter. The quickest ...

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.