• Post Reply Bookmark Topic Watch Topic
  • New Topic

convert primitive int to Object  RSS feed

 
harish pathak
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have to convert primitive int to Object.
How it is possible.

Please reply soon

I am getting error while executing following code..

request.setAttribute("fabricatorid",fabricatorid);
request.setAttribute("bannerid",bannerid);



as fabricatorid is int and it required Object.

Thanks
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37256
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Harish,
Try:
 
Kentaro Shinbashi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Harish,

I recommend reading the java 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.

Kentaro
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!