if my String contains 100 digits or 900 digits how can i parse it to Integer value Java.
public static void main(String...args){ long answer1=-1,answer2=-1;
Integer's MAX_VALUE is 2,147,483,647. Which is 10 digits.
MAX_VALUE
You can use BigInteger - No Limit, but it depends on your memory and system architecture.