silveira neto

carbon-based lifeform. virgo supercluster

Menu Close

Integer.MAX_VALUE and Integer.MIN_VALUE

You should know that variable values are cyclic in Java.

public class Test{
  public static void main(String args[]){
     System.out.println(Integer.MAX_VALUE);
     System.out.println(Integer.MIN_VALUE);
     int x = Integer.MAX_VALUE + 1;
     System.out.println(x);
  }
}

This produces:

2147483647
-2147483648
-2147483648

© 2016 silveira neto. All rights reserved.

Theme by Anders Norén.