Scope of java Basic Data Types

Source: Internet
Author: User

Scope of java Basic Data Types

System. out. println ("BYTE MAX_VALUE =" + Byte. MAX_VALUE); System. out. println ("BYTE MIN_VALUE =" + Byte. MIN_VALUE); System. out. println ("SHORT MAX_VALUE =" + Short. MAX_VALUE); // more than 30 thousand characters, 5-bit System. out. println ("SHORT MIN_VALUR =" + Short. MIN_VALUE); System. out. println ("Int MAX_VALUE =" + Integer. MAX_VALUE); // 2.1 billion, 10-bit System. out. println ("Int MIN_VALUE =" + Integer. MIN_VALUE); System. out. println ("LONG MAX_VALUE =" + Long. MAX_VALUE); // 9 ..., 19-bit System. out. println ("LONG MIN_VALUR =" + Long. MIN_VALUE); System. out. println ("FLOAT MAX_VALUE =" + Float. MAX_VALUE); System. out. println ("FLOAT MIN_VALUE =" + Float. MIN_VALUE); System. out. println ("DOUBLE MAX_VALUE =" + Double. MAX_VALUE); System. out. println ("DOUBLE MIN_VALUR =" + Double. MIN_VALUE );

  

Basic Type

Boolean

Byte

Char

Short

Int

Long

Float

Double

Void

Binary digits

1

8

16

16

32

64

32

64

--

Package class

Boolean

Byte

Character

Short

Integer

Long

Float

Double

Void

Float and double in java conform to the IEEE754 standard, and only the accuracy is output here.

The problem to be solved,

1. Why is the max index smaller than the absolute value of the min index?

2. What type of storage is used in the range of boolean, and type conversion occurs During computation?

3. What data types need to be converted during calculation in a virtual machine?

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.