why do you need a variable in catch exception and how do you use each it the same as the detailed exception?
TemperatureException and e
TooColdException and e
for example:
variable exception in java
TemperatureException and e
TooColdException and e
for example:
Code:
try { cust.drinkCoffee(cup); System.out.println("Coffee is just right."); } catch (TemperatureException e) { // This catches TooColdException, TooHotException, // as well as TemperatureException. System.out.println("Coffee is...