Parse an unsigned int in Java
int i = Integer.parseUnsignedInt("2200000000");
System.out.println(Integer.toUnsignedString(i)); // 2200000000
Note: Integer.parseInt would throw a NumberFormatException for the above input.
Comments
Be the first to comment!