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 |
Asad Niazi is Software Engineer , Programmer, Web Developers and a young mentor of Tech Solutions Desk and Blogging Solutions . Asad Love to writes about Technology, Programming, Blogging and make money online.
0 comments:
Post a Comment