Java basic data type Max limit and minimum value limit

Source: Internet
Author: User

To know the Java basic data type maximum limit and minimum value limit, write a small program is easy to know.

Test the maximum and minimum values for Integer, Long, Float, and Double, and the code is as follows:

public static void Main (string[] args) {System.out.println ("Integer.min_    VALUE = "+ Integer.min_value);      System.out.println ("Integer.max_value =" + Integer.max_value);    System.out.println ("Long.min_value =" + Long.min_value);      System.out.println ("Long.max_value =" + Long.max_value);    System.out.println ("Float.min_value =" + Float.min_value);    System.out.println ("Float.min_normal =" + Float.min_normal);      System.out.println ("Float.max_value =" + Float.max_value);    System.out.println ("Double.max_value =" + Double.max_value);  System.out.println ("Double.min_value =" + Double.min_value); The result of the output is as follows: You see for yourselves: Integer.min_value = -2147483648integer.max_value = 2147483647long.min_value =- 9223372036854775808long.max_value = 9223372036854775807float.min_value = 1.4e-45float.min_normal = 1.17549435e-38float.max_value = 3.4028235e38double.max_value = 1.7976931348623157e308double.min_value = 4.9E-324 

  

Java basic data type Max limit and minimum value limit

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.