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 |

No comments:
Post a Comment