Showing posts with label How to convert integer into string in Java. Show all posts
Showing posts with label How to convert integer into string in Java. Show all posts

Wednesday, 29 October 2014

Integer to String Conversion

Structure of the Problem Requirements 

In this problem we will learn how to convert integer into string in Java. String has many builtin function and one of them is Valueof function. The Valueof function is used to convert integer into string. In this problem we just convert a number into string . Here is the source code of this problem which help you in better understanding.

Source Code 


public class Conversion    
{
public static void main(String[] args)
{
System.out.println("\t \t \t LEP Tutorials \n ");
int num = 786;
System.out.println(" The Value of Number is : " + num);
String str = String.valueOf(num);
System.out.println(" The Value of String is : " + num);
}
}

Output of the Program

Integer to String Conversion in Java
Integer to String Conversion in Java