A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
convert primitive int to Object
Joined: Dec 17, 2005
Jun 10, 2006 08:24:00
I have to convert primitive int to Object.
How it is possible.
Please reply soon
I am getting error while executing following code..
as fabricatorid is int and it required Object.
Joined: May 26, 2003
Jun 10, 2006 08:38:00
request.setAttribute("fabricatorid", new Integer(fabricatorid));
How To Ask Questions The Smart Way
Blogging on Certs:
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
Joined: Jun 08, 2006
Jun 11, 2006 10:34:00
I recommend reading the
tutorial section about the wrapper classes Integer, Boolean, Float, and Double. Also, the api docs.
This will give you a general idea of how to pass ints as objects, floats as objects, etc.
It helped me a lot in figuring out solutions.
subject: convert primitive int to Object
Returning a boolean value in a object return method
difference between parsexxx() and valueOf()
Wrapper's String Constructor
Difference between int and Integer
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013