Here is compiled program which return String of any integer.
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
private static int number;
private static String stringresult;
public static void main (String[] args) throws java.lang.Exception
{
System.out.println("Int To String");
number=7667868;
stringresult=IntToString(number);
System.out.println("Number is To String="+stringresult);
}
public static String IntToString(int number)
{
int StringConvet = 48;
int eachDigit = number;
int afterDivide = number;
String reVal = "";
while(afterDivide >0)
{
eachDigit = afterDivide % 10;
afterDivide = afterDivide / 10;
if(eachDigit == 0)
{
reVal += "0";
}
else if(eachDigit == 1)
{
reVal += "1";
}
else if(eachDigit == 2)
{
reVal += "2";
}
else if(eachDigit == 3)
{
reVal += "3";
}
else if(eachDigit == 4)
{
reVal += "4";
}
else if(eachDigit == 5)
{
reVal += "5";
}
else if(eachDigit == 6)
{
reVal += "6";
}
else if(eachDigit == 7)
{
reVal += "7";
}
else if(eachDigit == 8)
{
reVal += "8";
}
else if(eachDigit == 9)
{
reVal += "9";
}
}
String reVal2 = "";
for(int index = reVal.length() -1 ; index >= 0 ; index--)
{
reVal2 += reVal.charAt(index);
}
return reVal2;
}
}