The explanation for the fifth option sounds:
"If the object graph contains non-serializable objects, an exception is thrown and nothing is serialized. Object graph means all the objects that are linked/referenced by the first object (directly or indirectly) that is being serialized. Fields of an Object that are marked as transient are not serialized and so they do not cause an exception. Any field that is not marked transient but points to an object of a class that does not implement Serializable, will cause an exception to be thrown. Thus, the given statement is wrong."
So, what if we have a superclass which does not implement Serializable interface? Will then an exception be thrown as well? Probably not, because otherwise we wouldnt be able to deserialize objects with such a superclass. Can you please explain this?
About Question enthuware.ocpjp.v8.2.1752 :
Moderator: admin
-
- Posts: 9
- Joined: Thu Feb 02, 2023 12:18 pm
- Contact:
-
- Site Admin
- Posts: 10046
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1752 :
No, the type of the superclass has no impact on the object graph. Superclass is not a separate object.
If you like our products and services, please help us by posting your review here.
-
- Posts: 9
- Joined: Thu Feb 02, 2023 12:18 pm
- Contact:
Who is online
Users browsing this forum: No registered users and 88 guests