xxxxxxxxxx
// new Integer(i) is deprecated in java
//therefore you can use the below mentioned technique
int iInt = 10;
Integer iInteger = Integer.valueOf(iInt);
xxxxxxxxxx
// Assuming `integerObj` is the Integer object that needs to be converted to int
int intValue = integerObj.intValue();
xxxxxxxxxx
public class IntToIntegerExample {
public static void main(String[] args) {
int i = 10;
Integer intObj = new Integer(i);
System. out. println(intObj);