String to long in Java

class Convert1
{
public static void main(String[] args)
{
String str = "420987654556";
long val = Long.parseLong(str);
System.out.println("long value:"+val);
}
}


Output:
long value:420987654556