Java Integer(int value) Constructor

Syntax

Integer(int value) constructor from Integer has the following syntax.

public Integer(int value)

Example

In the following code shows how to use Integer.Integer(int value) constructor.


public class Main {
  public static void main(String[] args) {
    Integer intObj1 = new Integer(10);
    System.out.println(intObj1);// w ww .j  a  va2 s  .  c o  m
  }
}

The output:





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable