Integer.parseInt(\"-1000\"); returns -1000 as the output.
Integer.parseInt(\"+500\"); throws an exception.
How will I be able to re
I am using Java 7, and Integer.parseInt("+500"); is not throwing any exception.
The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign
'-'('\u002D') to indicate a negative value or an ASCII plus sign'+'('\u002B') to indicate a positive value.
Java 7 documentation for Integer.parseInt(String)