title: How to print custom message using problematic input string when NumberFormatException
body: <p>Exception in thread "main" java.lang.NumberFormatException: For input string: "a"</p>
  
  <p>How can I access the input string which is causing NumberFormatException to print a custom error message in this form:</p>
  
  <pre><code>try {
      /* some code which includes many Integer.parseInt(some_string); */
  }
  catch (NumberFormatException nfe) {
      System.out.println("This is not a number: " + input_string_which_causing_the_error);
  }
  </code></pre>
  
  <p>Then I should get:</p>
  
  <blockquote>
    <p>This is not a number: a</p>
  </blockquote>