title: Not able to use Multi Catch from Java Effectively
body: <p>I really want to use features from Java-1.7. One of this feature is "Multi-Catch". Currently I have the following code</p>
  
  <pre><code>try {
      int Id = Integer.parseInt(idstr);
  
      TypeInfo tempTypeInfo = getTypeInfo(String.valueOf(Id));
  
      updateTotalCount(tempTypeInfo);
  } catch (NumberFormatException numExcp) {
      numExcp.printStackTrace();
  } catch (Exception exception) {
      exception.printStackTrace();
  } 
  </code></pre>
  
  <p>I want to remove the two catch blocks from the above code, and instead use single catch like below:</p>
  
  <pre><code>try {
      int Id = Integer.parseInt(idstr);
  
      TypeInfo tempTypeInfo = getTypeInfo(String.valueOf(Id));
  
      updateTotalCount(tempTypeInfo);
  } catch (Exception | NumberFormatException ex) { // --&gt; compile time error
      ex.printStackTrace();
  } 
  </code></pre>
  
  <p>But the above code is giving compile time error:</p>
  
  <blockquote>
    <p>"NumberFormatException" is already caught by the alternative
    Exception.</p>
  </blockquote>
  
  <p>I understood the above compile time error but what is the replace for my first block of code.</p>