Java 7 Try statement with multi catch

Tutorials Shared by the Internet Community

Advertisements


Synopsis

Java 7 Try statement with multi catch - Java Tutorials Corner

Statistics

  • Total Hits - 5773

  • Total Votes - 6 votes

  • Vote Up - 3 votes

  • Vote Down - 3 votes

  • Domain - www.javatutorialcorner.com

  • Category - JAVA/Core JAVA

  • Submitted By - Appu T

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

Description

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: http://www.javatutorialcorner.com/search/label/Java ...


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

Advertisements