Java eight Big data types

Source: Internet
Author: User
Tags wrapper

There are eight Java basic data types, and the basic types can be divided into three categories: Character type char, Boolean type Boolean, and numeric type byte,short,int,long,float,double. Numeric types can also be classified as integer-type Byte,short,int,long and floating-point data type float,double. There are no unsigned numeric types in Java, their range is fixed and will not change with their hardware environment or operating system. In fact, there is another data type Void in Java, which also has a corresponding wrapper class java.lang.Void, but we cannot manipulate them directly.

define the simple type, occupy bits number and corresponding wrapper class diagram:

Simple Type Boolean Byte Char Short Int Long Float Double void
Number of binary digits 1 8 16 16 32 64 32 64 --
Wrapper class Boolean Byte Character Short Integer Long Float Double Void

Basic types of benefits: Data storage is relatively simple, efficient operation

The advantages of packaging class: some easy. For example, the element of a collection must be an object type, satisfying the idea that everything in Java is an object

2018-05-10 09:28:59

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