Java Long.toString()
Syntax
Long.toString() has the following syntax.
public String toString()
Example
In the following code shows how to use Long.toString() method.
public class Main {
//from ww w. j a v a 2 s . c o m
public static void main(String[] args) {
Long l = new Long(1234567890);
// returns a string representation of the long value in base 10
String retval = l.toString();
System.out.println("Value = " + retval);
}
}
The code above generates the following result.