Question: What is output? public class MathOps { public static int divOp ( int num, int denom ) throws Exception { if ( denom = =
What is output?
public class MathOps
public static int divOpint num, int denom throws Exception
if denom
throw new ExceptionInvalid div input";
return num denom;
public static double sqrtOpdouble num throws Exception
if num
throw new ExceptionInvalid sqrt input";
return Math.sqrtnum;
public static void mainString args
try
int x;
int y;
x ;
y ;
System.out.printlndivOpx y;
System.out.printlnsqrtOpdoubley;
catch Exception excpt
System.out.printlnexcptgetMessage;
System.out.printlnCannot compute operation";
a
Invalid div input
Invalid sqrt input
b
Invalid div input
Cannot compute operation
c
Invalid div input
Invalid sqrt input
Cannot compute operation
d
Cannot compute operation
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
