Converting a String to a long type Number in Java
Description
The following code shows how to converting a String to a long type Number.
Example
//from ww w . j a va 2 s.co m
public class Main {
public static void main(String[] argv) throws Exception {
long l = Long.parseLong("123");
System.out.println(l);
}
}
The code above generates the following result.
Home »
Java Tutorial »
Java Data Type »
Java Tutorial »
Java Data Type »