I am getting an error while trying to convert a string to Long.
Long l = Long.parseLong(str);
Exception is:
java.lang.NumberFormatException: For input string: "20120828000040464018674B"
at java.lang.Long.parseLong(Long.java:415)
at java.lang.Long.parseLong(Long.java:461)
According to the Javadoc for Long,
Long.MAX_Valueis defined as 2^63 – 1. The value that you’ve provided is greater than the given value and hence a NumberFormatException is getting thrown.