Question: What is output? public class Division { public static double division ( double a , double b ) throws Exception { if ( b =
What is output?
public class Division
public static double divisiondouble a double b throws Exception
ifb
throw new ExceptionInvalid number.";
return a b;
public static void mainString args
try
System.out.printlnResult: division;
catch ArithmeticException e
System.out.printlnArithmetic Exception Error";
catch Exception except
System.out.printlnDivision by Zero";
catchThrowable thrwObj
System.out.printlnError;
Arithmetic Exception Error
Division by Zero
Error
Division by Zero
Arithmetic Exception Error
Error
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
