title: java.lang.NumberFormatException.forInputString
body: <p>I'm trying to convert my binary string to decimal value but i'm getting error.
  The binary string is of 32 bits so no case of overflow.</p>
  <pre><code>String s = &quot;11111111111111111111111111111101&quot;;
  System.out.print(s.length());
  System.out.print(Integer.parseInt(s,2));
  </code></pre>
  <p>Exception is:-</p>
  <pre><code>Exception in thread &quot;main&quot; java.lang.NumberFormatException: For input string: &quot;11111111111111111111111111111101&quot;
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      at java.lang.Integer.parseInt(Integer.java:583)
  </code></pre>