Java Data Type Tutorial - 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);
  }
}

The output: