Question: X1153: No Dividing with 5 The method below takes in two integers as parameters and should throw an IllegalArgumentException if either parameter is the number
X1153: No Dividing with 5
The method below takes in two integers as parameters and should throw an IllegalArgumentException if either parameter is the number 5. In the conditional below, throw the required exception.
public int divideValues(int num, int denom) throws IllegalArgumentException { if (num == 5 || denom == 5) { } return num / denom; }
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
