Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

conversion from int to String

 
Anup Jadhav
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey folks,

I am new to JSP and Java, can you please show me a sample piece of code for converting an int to String.

Thanks in advance !!!
AJ
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64972
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to java in General (beginner).
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64972
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the String.valueOf() methods.
 
Kenneth Albertson
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This works quite well too. You do it all the time in println(). It is a characteristic of string concatenation:
 
Naveen Vooka
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Anup Jadhav:
converting an int to String.


http://forum.java.sun.com/thread.jspa?threadID=543284&messageID=2636988

--------------
Naveen Vooka
www.devsquare.com
DevSquare - Online Application Development
[ October 03, 2005: Message edited by: Naveen Vooka ]
 
Anup Jadhav
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot guys,

Guys, one more thing, I am basically writing a jsp file with HTML-B tags adn scriptlets.
Now inside the scriptlet, I have a variable check_box_id in JSP and I want to pass this id to a java file.
How do I do that?

-AJ
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15367
40
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'd better open a new topic in the appropriate forum if you're going to ask a new question that's totally unrelated to your previous question.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic