JAVA 8 Big Data types

Source: Internet
Author: User

8 large basic data types

8 Number of bits in memory used by the large base data type:

automatic conversion of basic data types:

Automatic type conversion, also known as implicit type conversion, refers to a type conversion that is done automatically by the system without writing code. Because of the many types of conversions in real-world development, the Java language was designed so that it did not design the syntax for the operation, but was done automatically by the JVM. Automatic conversions are converted in order from low to high. The priority relationships between different types of data are as follows:

Low---------------------------------------------> High

byte,short,char-> int, long, float---double


Operations, different types of data are converted to the same type first, then the operation, the conversion rules are as follows:

conversions for basic data types:

Coercion type conversions, also known as explicit type conversions, are type conversions that must be written in order to complete the code. This class type conversion is likely to have a loss of precision, so you must write the appropriate code and be able to tolerate that type of conversion.

Conversion rules: From a type with a large storage range to a type with a small storage range.

The specific rules are: Double→float→long→int→short (char) →byte

The syntax format is: (the type converted to) the value that needs to be converted

Note: Small turn assembly has lost the accuracy of the problem!

JAVA 8 Big Data types

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.