This week's book giveaway is in the
Agile and other Processes
forum.
We're giving away four copies of
The Mikado Method
and have Ola Ellnestam and Daniel Brolund on-line!
See
this thread
for details.
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
Beginning Java
Author
Changing int into object
Manoj Paul
Ranch Hand
Joined: Jan 18, 2007
Posts: 109
posted
Jun 06, 2007 23:58:00
0
Hi
How will i change int abc into an object?
Please advice
Anupam Sinha
Ranch Hand
Joined: Apr 13, 2003
Posts: 1088
posted
Jun 07, 2007 01:58:00
0
Ty looking for it
here
.
Chandra Bhatt
Ranch Hand
Joined: Feb 28, 2007
Posts: 1707
posted
Jun 07, 2007 02:07:00
0
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
posted
Jun 07, 2007 06:15:00
0
Alternatively:
int i1=100; Integer I1 = Integer.valueOf(i1);
Arnav Velimala
Ranch Hand
Joined: Jun 04, 2007
Posts: 37
posted
Jun 07, 2007 06:49:00
0
With J2SE 5.0 Autoboxing feature, you can simply code like this:
Integer i = 15;
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Changing int into object
Similar Threads
Object to int array conversion
Question on deepToString()
Vector.addElement() not working
using rownum with union
Very Basic Question
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter