Logo

Programming-Idioms

History of Idiom 55 > diff from v52 to v53

Edit summary for version 53 by programming-idioms.org:
New Java implementation by user [programming-idioms.org]

Version 52

2017-03-24, 20:27:54

Version 53

2017-03-24, 20:28:46

Idiom #55 Convert integer to string

Create the string representation s (in radix 10) of integer value i.

Illustration

Idiom #55 Convert integer to string

Create the string representation s (in radix 10) of integer value i.

Illustration
Extra Keywords
int base radix conversion
Extra Keywords
int base radix conversion
Code
String s = Integer.toString(i);
Comments bubble
This is a static method, no need to create an Integer instance.
Doc URL
https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#toString(int)
Origin
http://stackoverflow.com/a/4105406/871134