Hi,
I think this is a good question, but I am curious: Do we need to memorize which I/O Stream class method throws which exception?
About Question enthuware.ocpjp.v17.2.3706 :
Moderator: admin
-
- Posts: 26
- Joined: Thu Aug 24, 2023 4:33 pm
- Contact:
-
- Site Admin
- Posts: 10066
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v17.2.3706 :
Not for all classes but for serialization, yes, you need to know that it may throw a ClassCastException. This is actually quite relevant to deserialization. ClassCastException needs to be handled separately because it doesn't extend IOException.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: Bing [Bot] and 142 guests