Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
Changing int into object
Manoj Paul
Ranch Hand
Posts: 112
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi
How will i change int abc into an object?
Please advice
Anupam Sinha
Ranch Hand
Posts: 1090
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Ty looking for it
here
.
Chandra Bhatt
Ranch Hand
Posts: 1710
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
int i1=100;
Integer I1 = new Integer(i1);
Now you have Integer object.
Thanks,
cmbhatt
Simon Baker
Ranch Hand
Posts: 57
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Alternatively:
int i1=100; Integer I1 = Integer.valueOf(i1);
Arnav Velimala
Ranch Hand
Posts: 37
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
With J2SE 5.0 Autoboxing feature, you can simply code like this:
Integer i = 15;
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Object to int array conversion
Very Basic Question
Vector.addElement() not working
using rownum with union
Question on deepToString()
More...