[Java] Main data types

Overview

List the main data types provided in Java and organize the characteristics of each type.

Assumed reader

--Beginner Java Engineer

About data type

What is a data type?

Data handled by programming languages is classified into several types, and rules such as names, characteristics, ranges, handling methods, notations, and recording methods on memory are defined for each type.

Source: [What is a data type? --IT Glossary e-Words](http://e-words.jp/w/%E3%83%87%E3%83%BC%E3%82%BF%E5% 9E% 8B.html)

Why it exists

To clarify the use of data.

[Java] Data type list

Data type value Remarks
boolean true(true)or fake(false) Logical type
char 16-bit Unicode characters * Not a character string
String String
byte 8-bit integer -128~127
short 16-bit integer -32,768~32,767
int 32-bit integer -2,147,483,648~2,147,483,647
long 64-bit integer -9,223,372,036,854,775,808~9,223,372,036,854,775,807
float 32-bit single precision floating point number
double 64-bit single precision floating point number

Supplement

What is Unicode

One of the international industry standards for character codes, which records characters in various languages around the world, assigns serial numbers, and allows them to be used under the same code system.

Quote: What is Unicode-IT Glossary e-Words

Characters and strings

A character as a symbol is called a "character", and a collection of characters is called a "character string".

What is a bit

The smallest unit of information, the amount of information that identifies one of two options. The etymology is called "binary digit", and it is expressed as a single digit of a binary number that takes either 0 or 1 in computers and the like. Replacing all information with bit strings and handling it is called "digital".

Quote: What is Bit--IT Glossary e-Words

Recommended Posts

[Java] Main data types
Java basic data types
Java Learning 1 (learning various data types)
Basic data types and reference types (Java)
Java basic data types and reference types
About Java data types (especially primitive types) and literals
[Java] Data type ①-Basic type
[Java] Variables and types
Java review ① (development steps, basic grammar, variables, data types)
About Java basic data types and reference type memory
Java learning memo (data type)
Java programming (variables and data)
About Java class loader types
Importing Excel data in Java 2
I investigated Java primitive types
Import Excel data in Java
Java addition excel data validation
Java for beginners, data hiding
Importing Excel data in Java 3
List data structure [Java / Scala]
Java variable declaration, initialization, and types
[Java] Basic types and instruction notes
[Introduction to Java] Variables and types (variable declaration, initialization, data type)
Java primitive types, reference types, Immutable, Mutable
[Java] Data type / matrix product (AOJ ⑧ Matrix product)
Java array variables are reference types
Java
[Java] Runtime Data Areas of JVM
About Java primitive types and reference types
Java
List of types added in Java 9
[Java] Exception types and basic processing
Java starting from beginner, variables and types
Java date data type conversion (Date, Calendar, String)
Create variable length binary data in Java
Data processing using stream API from Java 8
Use PostgreSQL data type (jsonb) from Java
[Java] How to add data to List (add, addAll)
[Personal memo] Java data type is annoying
Kinesis Data Streams from zero Java experience (1)
Java programming (classes and instances, main methods)
What is the main method in Java?
Kinesis Data Streams from zero Java experience (3.1)
[Introduction to Java] Variable declarations and types
Rails: A little summary about data types
Kinesis Data Streams from zero Java experience (3.2)
[Introduction to Java Data Structures] Create your own fast ArrayDeque for primitive types