Convert java int to Integer object - Java Language Basics

Java examples for Language Basics:int

Description

Convert java int to Integer object

Demo Code

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

Result


Related Tutorials