Max, min value of an integer type variable

TypeFieldSummary
static intMAX_VALUEThe maximum value an int can have.
static intMIN_VALUEThe minimum value an int can have.
static intSIZEThe number of bits used to represent an int value.
static ClassTYPEThe Class instance representing the primitive type int.

public class Main {
  public static void main(String[] args) {
    System.out.println(Integer.MAX_VALUE);
    System.out.println(Integer.MIN_VALUE);
    System.out.println(Integer.SIZE);
  }
}

The output:


2147483647
-2147483648
32
java2s.com  |  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.