aspose file tools*
The moose likes Beginning Java and the fly likes Changing int into object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Changing int into object" Watch "Changing int into object" New topic
Author

Changing int into object

Manoj Paul
Ranch Hand

Joined: Jan 18, 2007
Posts: 112
Hi

How will i change int abc into an object?
Please advice
Anupam Sinha
Ranch Hand

Joined: Apr 13, 2003
Posts: 1088
Ty looking for it here.
Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707
int i1=100;
Integer I1 = new Integer(i1);
Now you have Integer object.


Thanks,


cmbhatt
Simon Baker
Ranch Hand

Joined: Sep 09, 2004
Posts: 57
Alternatively:
Arnav Velimala
Ranch Hand

Joined: Jun 04, 2007
Posts: 37
With J2SE 5.0 Autoboxing feature, you can simply code like this:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing int into object