Parse an unsigned long in Java
long lng = Long.parseUnsignedLong("10000000000000000000");
System.out.println(Long.toUnsignedString(lng)); // 10000000000000000000
Note: Long.parseLong
would throw a NumberFormatException
for the above input.
Comments
Be the first to comment!