What is going on here?
This is the value of checkSum = "2367122119"
. And I would like to parse this number as an integer value like this:
int ipAddressAsInt = Integer.parseInt(checkSum.trim());
As a result I'm getting the following exception:
java.lang.NumberFormatException: For input string: "2367122119"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:583)
at java.lang.Integer.parseInt(Integer.java:615)
at com.example.servlets.RDServlet.doPost(RDServlet.java:40)
...
Also, the same happens if I try Long.parseLong(checkSum)
.
How is that possible?