You are here: Home / Topics / Program to use Simple Wrapper Class in Java

Program to use Simple Wrapper Class in Java

Filed under: Java on 2023-09-19 08:07:19

//  Program to use Simple Wrapper Class.

class  Wrapper1
{
public static void main( String args[ ] )
{
 // Boxing
 Integer  iOb = new Integer(100);

 // Unboxing
 int i = iOb.intValue();

 System.out.println(i + " : " + iOb); 
}
}


Output:

100 : 100

About Author:
S
Shyam Dubey     View Profile
If you are good in any field. Just share your knowledge with others.