Integer: intValue() : Integer « java.lang « Java by API






Integer: intValue()

 
/*
 * Output:
 
i1 = 5
i2 = 6



 */


public class MainClass {
  public static void main(String args[]) {
    Integer iobj1 = new Integer(5);
    Integer iobj2 = new Integer("6");
    int i1 = iobj1.intValue();
    int i2 = iobj2.intValue();
    System.out.println("i1 = " + i1);
    System.out.println("i2 = " + i2);
  }
}
           
         
  








Related examples in the same category

1.Integer.MAX_VALUE
2.Integer: MIN_VALUE
3.Integer: Integer.SIZE
4.Integer: bitCount(int i)
5.Integer: equals(Object obj)
6.Integer: highestOneBit(int i)
7.Integer: lowestOneBit(int i)
8.Integer: numberOfLeadingZeros(int i)
9.Integer: numberOfTrailingZeros(int i)
10.Integer: reverseBytes(int i)
11.Integer: rotateLeft(int i, int distance)
12.Integer: signum(int i)
13.Integer: toBinaryString(int intValue)
14.Integer: toHexString(int intValue)
15.Integer: toOctalString(int intValue)
16.Integer: parseInt(String stringValue)
17.Integer: valueOf(String stringValue)