ALPINE SKI HOUSE
EXCEPTION
HANDLING
TEAM2
ALPINE SKI HOUSE
WHAT IS
EXCEPTION
HANDLING
ALPINE SKI HOUSE
ALPINE SKI HOUSE
EXCEPTION HANDLING
• The Exception Handlingin Java is one of the powerful mechanismto handletheruntime
errorsso that the normal flow of the application can be maintained.
• In Java, an exception is an event that disrupts the normal flow of the program. It is an
object which is thrown at runtime.
• Exception Handlingis a mechanismto handle runtime errors such as
ClassNotFoundException, IOException, SQLException, RemoteException, etc.
3
ALPINE SKI HOUSE
EXCEPTION
HIERARCHY
4
ALPINE SKI HOUSE 5
ALPINE SKI HOUSE
TYPES OF
EXCEPTIONS
6
ALPINE SKI HOUSE 7
ALPINE SKI HOUSE
JAVA
EXCEPTION
KEYWORDS
ALPINE SKI HOUSE 9
ALPINE SKI HOUSE
JAVA EXCEPTION
HANDLING EXAMPLE
10
ALPINE SKI HOUSE
ALPINE SKI HOUSE
JAVAEXCEPTIONEXAMPLE.JAVA
1. public class JavaExceptionExample{
2. public static void main(String args[]){
3. try{
4. //code that may raise exception
5. int data=100/0;
6. }catch(ArithmeticException e){System.out.println(e);}
7. //rest code of the program
8. System.out.println("rest of the code...");
9. }
10.} 11
ALPINE SKI HOUSE 12
ALPINE SKI HOUSE 13
ALPINE SKI HOUSE 14
ALPINE SKI HOUSE 15

Exception handling in java about the java exceptions and the all handlers.pptx

Editor's Notes

  • #3 © Copyright Showeet.com – Free PowerPoint Templates
  • #4 © Copyright Showeet.com – Free PowerPoint Templates
  • #5 © Copyright Showeet.com – Free PowerPoint Templates
  • #7 © Copyright Showeet.com – Free PowerPoint Templates
  • #12 © Copyright Showeet.com – Free PowerPoint Templates