Skip to content

Integer (java.lang.Integer)

  • Wrapper class for int
  • Package: java.lang.Integer
  • Reference:
NameTypeSub-TypeUse
BYTEfieldstatic intInteger.BYTE
MAX_VALUEfieldstatic intInteger.MAX_VALUE
MIN_VALUEfieldstatic intInteger.MIN_VALUE
SIZEfieldstatic intInteger.SIZE
Integer(int value)constructor-Integer(10)
Integer(String value)constructor-Integer(“10”)
parseInt(String s, int radix)methodstatic intInteger.parseInt(“0110”, 2) \ 6
toBinaryString(int i)methodStringInteger.toBinaryString(2)
valueOf(int i)methodstatic intInteger.valueOf(20)
bitCount(int i)methodInteger.bitCount(10)
compareTo(Integer anotherInteger)methodinti.compareTo(j)
max(int i, int j)methodstatic intInteger.max(i, j)
min(int i, int j)methodstatic intInteger.min(i, j)