Three Simple ways to convert integer to String in JAVA

Strings

Following are the ways by which you can convert integer to String in JAVA..

1. String s = String.valueOf(n);

2. String s = Integer.toString(n);

3. String s = ""+n;

//Here n is an integer.

Previous Post Next Post

Contact Form