© Kishori Sharan and Adam L. Davis 2022
K. Sharan, A. L. DavisBeginning Java 17 Fundamentalshttps://doi.org/10.1007/978-1-4842-7307-4_4

4. Data Types

Kishori Sharan1   and Adam L. Davis2
(1)
Montgomery, AL, USA
(2)
Oviedo, FL, 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

  • Local variable type inference using “var”

  • 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 ...

Get Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 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.