PPT Slide
// get input for divisor and dividend
fResult = (float) iDividend / iDivisor;
System.out.println(fResult);
catch (ArithmeticException e)
System.out.println("The divisor was 0");
Exceptions: Simple Example
An example showing the structure of Java’s exception handling:
Care about the exception,
Just about its type being arithmetic error.