xxxxxxxxxx
// Assuming `integerObj` is the Integer object that needs to be converted to int
int intValue = integerObj.intValue();
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
int[] data = {1,2,3,4,5,6,7,8,9,10};
// To boxed array
Integer[] what = Arrays.stream( data ).boxed().toArray( Integer[]::new );
Integer[] ever = IntStream.of( data ).boxed().toArray( Integer[]::new );
// To boxed list
List<Integer> you = Arrays.stream( data ).boxed().collect( Collectors.toList() );
List<Integer> like = IntStream.of( data ).boxed().collect( Collectors.toList() )
xxxxxxxxxx
public class IntToIntegerExample {
public static void main(String[] args) {
int i = 10;
Integer intObj = new Integer(i);
System. out. println(intObj);