English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
To convert an integer to a string, please first set an integer.
int val = 150;
Now, use the Integer.toString() method and pass the same int value. This method returns the string representation.
String myStr = Integer.toString(val);
Now let's see the complete example.
public class Demo { public static void main(String args[]) { int val = 150; //Integer to String String myStr = Integer.toString(val); System.out.println("String: " "+myStr); } }
Output Result
String: 150