Java Basic data types

Source: Internet
Author: User
I. Types of Java data type 1. Java Shared 4 classes 8 data types

2. Value range of data types

Byte:8 bits, the maximum amount of storage data is 255, the stored data range is between -128~127.

Short:16 bits, the maximum data storage is 65536, the data range is -32768~32767.

Int:32 bits, the maximum data storage capacity is 2 of the 32-bit minus 1, the data range is negative 2 of 31 times to positive 2 square minus 31.

Long:64 bits, the maximum data storage capacity is 2 of the 64-bit minus 1, the data range is negative 2 63 times to positive 2 square minus 63.

Float:32 bit, the data range in the 3.4e-45~1.4e38, the direct assignment must be in the number after the addition of F or F.

double:64 bit, data range in 4.9e-324~1.8e308, the assignment can be added D or D can also not add.

Boolean: Only True and false two values are taken.

Char:16 bits, storing Unicode codes, and assigning values in single quotes.

Java Basic data types

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.