Java Data types

Source: Internet
Author: User

First diagram (citation: Deep Java Virtual machine)

There are two types of data in Java, basic types (byte, short, char, int, float, double, long, Boolean) and reference types (class references, interface references, array references).

1. The base type is the type of operand that can be stored in the method stack and may not be stored in the heap area. The reference type simply stores the address of the heap in the stack (which can also be interpreted as a pointer).

2. Basic type There is a returnaddress (keep, wait for me to read the continuation), is used to execute the finally statement.

3. Byte, short, Char, and Boolean in the base type are calculated as int values, and the completion of the operation is then dumped into the corresponding type data.

The basic type data range is as follows:

The 1.char type is indeed two bytes, please refer to http://www.cnblogs.com/akgang/p/8057356.html for details.

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