Not able to parse when String has dot : <p>I am trying to convert <code>String temp = 129.70</code> to number.</p>

<p><strong>I tried:</strong></p>

<pre><code>String decimalNumber= "-129.70";
System.out.println(Integer.parseInt(decimalNumber));
</code></pre>

<p>But it is giving me exception <code>Exception in thread "main" java.lang.NumberFormatException: For input string: "-129.70"</code></p>
