Integer to String Conversion

String has many built-in functions and one of them is Valueof function. The Valueof function is used to convert integer into string.

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

Share on Google Plus

About Asad

Asad Niazi is Software Engineer , Programmer, Web Developer and a young mentor of BloggersTown and PProgramming. Asad Love to writes about Technology, Programming, Blogging and make money online.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment