Exception Handling Simple Program In Java

/*Write a program for Handling an Exception In java.*/
class ExceptionHandling
{
public static void main(String args[])
{
try
{
int a=Integer.parseInt(arr[0]);
int b=Integer.parseInt(arr[1]);
int sum = a/b;
System.out.println("Result:"+ sum);
}
catch(Exception e)
{
System.out.println(e);
}
}
}

● Save the file as ExceptionHandling.java.

Output:-