1// new Integer(i) is deprecated in java
2//therefore you can use the below mentioned technique
3int iInt = 10;
4Integer iInteger = Integer.valueOf(iInt);
1public class IntToIntegerExample {
2 public static void main(String[] args) {
3 int i = 10;
4 Integer intObj = new Integer(i);
5 System.out.println(intObj);
6 }
7}
1public class IntToIntegerExample {
2public static void main(String[] args) {
3int i = 10;
4Integer intObj = new Integer(i);
5System. out. println(intObj);