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: 29
- Joined: Thu Aug 24, 2023 4:33 pm
- Contact:
-
- Site Admin
- Posts: 10388
- 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.
Who is online
Users browsing this forum: No registered users and 5 guests