int max/min value
In this chapter you will learn:
Max, min value of an integer type variable
static int MAX_VALUE
stores the maximum value an int can have.static int MIN_VALUE
stores the minimum value an int can have.static int SIZE
stores the number of bits used to represent an int value.
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);//from j a v a2s.c o m
}
}
The output:
Next chapter...
What you will learn in the next chapter:
Home » Java Tutorial » Primitive Data Types