 <p>As <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NumberFormatException.html" rel="nofollow">JavaDoc</a> says</p> <blockquote> <p><code>public class NumberFormatException extends IllegalArgumentException</code></p> <p>Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.</p> </blockquote> <p>Since <code>String[] tokens = s.split("/t");</code> line will not split tabular as <code>\t</code> is tabular not <code>/t</code> hence String didn't get split and you get <code>NumberFormatException</code></p>