8 Basic data types supported in the Java language

Source: Internet
Author: User
Tags float double

The 8 basic data types supported in the Java language are:byte (byte), short, int (integer), long (length), float (single-precision float), double (double-precision floating-point), Boolean (Boolean), char (character type) The concrete can be divided into four categories:

Integer byte short int long

Float type float Double

Logical Boolean (it has only two values desirable true false)

Character Char

The form is as follows:

Value range
basic type occupy space size default
boolean unsure true/false false
byte one byte -128----127 0
int 4 bytes -2^31-2^31-1 0
short 2 bytes -2^15-2^15-1 0
long 8 bytes -2^63-2^63-1 0L
Char 2 bytes   \u0000
float 4 bytes -2^128-2^128< /td> o.of
double 8 bytes -2^1024-2^1024 0.0D

Basic data types supported in the Java language 8

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.