36.3k views
3 votes
Create a public class called Catcher that defines a single class method named catcher. catcher takes, as a single parameter, a Faulter that has a fault method. You should call that fault method. If it generates no exception, you should return 0. If it generates a null pointer exception, you should return 1. If it throws an illegal argument exception, you should return 2. If it creates an illegal state exception, you should return 3. If it generates an array index out of bounds exception, you should return 4.

User Jjz
by
4.7k points

1 Answer

4 votes

Answer:

Sorry mate I tried but I got it wrong

Step-by-step explanation:

Sorry again

User Gad
by
4.5k points