//Java code to convert along to String
public class Main {
public static void main(String args[]) {
long a = 112120;
long b = 2121210;
//variable to store result
String result = null;
//converting long to string
result = Long.toString(a);
System.out.println("result (value of a as string) = " + result);
result = Long.toString(b);
System.out.println("result (value of b as string) = " + result);
}
}
Output
result (value of a as string) = 112120
result (value of b as string) = 2121210
Java code to convert a Long to String
Output