Short.MAX_VALUE : Short « java.lang « Java by API






Short.MAX_VALUE

 
/*
i=32767
i=-32768
i=-32767
i=2147483647
i=-2147483648
i=-2147483647 
 */
public class MainClass {
  public static void main(String[] unused) {
    do_shorts();
    do_ints();
  }
  protected static void do_shorts() {
    short i = Short.MAX_VALUE;
    System.out.println("i=" + i++);
    System.out.println("i=" + i++);
    System.out.println("i=" + i++);
  }
  protected static void do_ints() {
    int i = Integer.MAX_VALUE;
    System.out.println("i=" + i++);
    System.out.println("i=" + i++);
    System.out.println("i=" + i++);
  }
}

           
         
  








Related examples in the same category

1.new Short(String s)
2.new Short(short value)
3.Short: byteValue()
4.Short: doubleValue()
5.Short: floatValue()
6.Short: intValue()
7.Short: longValue()
8.Short: parseShort(String s,int radix )
9.Short: shortValue()
10.Short: toString()
11.Short: valueOf(String stringValue)