Question: please solve with explanation. Given a user defined exception called invalidProductException, change the method productCheck to throw this an InvalidProductException if the product weight is
Given a user defined exception called invalidProductException, change the method productCheck to throw this an InvalidProductException if the product weight is less than 100. Then change the main method so that it catches the invalidProductException thrown by productCheck and prints the "Invalid Product" if it is thrown
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
