In this post, we will learn to convert int to String in java with example
Even this is a simple post, But it is difficult to remember all syntax. We can easily convert int to String using valueOf() method
Syntax
String.valueOf(i);
Example
public class ConvertInttoString {
public static void main(String[] args) {
int i = 99;
String stringValue = String.valueOf(i);
System.out.println("Converted String " + stringValue);
}
}
Output
Converted String 99
Related Articles
Convert String to lowercase using java
convert String to date in java with example