Skip to content
This repository was archived by the owner on Nov 1, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions exception.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import java.io.*;
import java.util.*;
class exception{
public static void main(String args[])
{
int a = 10;
int b[] = new int[4];
try
{
int c = a/0;
}
catch(ArithmeticException e)
{
System.out.println("ArthimeticException"+e);
}
try
{
b[5] = 99;
}
catch(ArrayIndexOutOfBoundsException ae)
{
System.out.println("An error ocurred :"+ae);
}
}
}