This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Integer Conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Integer Conversion" Watch "Integer Conversion" New topic
Author

Integer Conversion

Natalia Helwig
Greenhorn

Joined: Jun 05, 2001
Posts: 1
Question:
How do I easily convert an integer into a string???
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
int i = 3;
String s = String.valueOf(i);


"JavaRanch, where the deer and the Certified play" - David O'Meara
Sayed Ibrahim Hashimi
Ranch Hand

Joined: May 17, 2001
Posts: 148
Hi, you can also use:

Originally posted by Natalia Helwig:
Question:
How do I easily convert an integer into a string???


SCJP 1.4<br /><a href="http://www.cise.ufl.edu/~sih" target="_blank" rel="nofollow">www.cise.ufl.edu/~sih</a>
 
GeeCON Prague 2014
 
subject: Integer Conversion