Java 7 Try statement with multi catch

Tutorials Shared by the Internet Community



Java 7 Try statement with multi catch - Java Tutorials Corner


  • Total Hits - 27221

  • Total Votes - 6 votes

  • Vote Up - 3 votes

  • Vote Down - 3 votes

  • Domain -

  • Category - JAVA/Core JAVA

  • Submitted By - Appu T

  • Submitted on - 2014-03-16 09:03:06


In this tutorial we are going to see java7 multi catch for similar type exception Historically, catching multiple exceptions results in a catch block for each exception, with each block containing a variable with the type of that particular exception. In many cases, these catch blocks contained identical code that referenced the specified exception variable. It was difficult to write a common method to handle this duplicated code because the exception variables had different types, So you have possibility to write code to catch parent exception... - See more at: ...

Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down