title: Catching exception types twice
body: <p>Can we catch an exception type twice in the main method with different messages? I want to print out a different warning.</p>
  
  <h2>Ex:</h2>
  
  <pre><code> try {
      // some code
   } catch (NumberFormatException e) {
      System.out.println("Wrong input!"); 
   } catch (NumberFormatException e) {
      System.out.println("No valid number!"); 
   }
  </code></pre>