In reality, there are oceans of exceptions in programs, and you'll eventually get used to them. You can start right now: populate the list exceptions with ten (10) different exceptions. The first exception is already implemented in the initExceptions method.
Exception invasion
- 8
Locked
Comments (6)
- Popular
- New
- Old
You must be signed in to leave a comment
Alaskian7134
2 June 2021, 13:45
you can just make
and see what sugestions the IDE will give you and finish everything in 20 seconds, you don't really need to do the try-catch block for every exception. but to be honest i find it really fun to do the try-catch for evert exception and i think is a good practice. took me about 20 minute to remember 10 exceptions and a way to throw each of it +2
Karas Java Developer
31 March 2021, 19:09
or just throw an specific new exception hahahaha.
0
Libby
4 March 2021, 17:35
you don't have to make a try/catch block to get your exception as they give us for the first exception.
you just have to add 'new exception' to the ArrayList
0
Ed Maphis
4 June 2019, 16:12
This one took some research.
0
Andrew
30 January 2019, 22:07
This is an awesome exercise. Very valuable experience.
0
Benjamin Winchester
2 December 2018, 08:05
HAHAHA, make 10 user-defined exceptions...
0