|
Sep 03
|
The Long class contains a number of (static) methods for converting to/from various formats. To convert to a long use static method Long.parseLong()
String s = "123";
try
{
long l = Long.parseLong(s);
}
catch (NumberFormatException ex)
{
// s is not a long
}



Recent Comments