Android convert int to string java


Convert an Integer into a String

In this section, you will learn to convert an integer type data into a string type. The java.lang package provides this conversion functionality through toString() method.

Code Description:

This program takes an integer number at the console and it converts it into a string format using the Integer(str).toString() method. The given number takes an integer number that must be converted into an string format. The toString() method convert Integer number to string number.

The toString() method converts an integer value into a String.

Here is the code of this program:
import java.lang.*;

public class IntegerToString {
public static void main(String[] args) throws IOException{
BufferedReader read =
new BufferedReader(new InputStreamReader(;
System.out.println(“Enter the integer value!”);
String str = read.readLine();
String s = new Integer(str).toString();
System.out.println(“String:=” +s);

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>