answer : D B - is not right but it may be used as a second choice
A. is not correct by default transient fields are not serializable
B. not sure
"the class definition used is the same as the class definition "
I would say the class attributes with the appropriate type. it Could be casting like
ValueObject vo2 = (ValueObject) in.readObject();
This class definition is stored as a part of the serialized object. This stored metadata enables the deserialization process to reconstitute the objects and map the stream data into the class attributes with the appropriate type.
C. is not correct
several ways of serialization
. Implement Serializable with undefined readObject and writeObject methods
D. is right
The two good practices for serializing Java objects are:
B. Ensure that the class definition used is the same as the class definition used by the Java runtime at the time when the object was serialized.
This ensures that the serialized object can be correctly deserialized by the Java runtime using the same class definition.
D. Implement secure serialization by generating a secure object hash or using encryption.
Implementing secure serialization helps protect the integrity and confidentiality of the serialized data, which is important for sensitive or secure information.
Ensuring that the class definition used is the same as the class definition used by Java runtime at the time when the object was serialized is important because it ensures that the object can be correctly deserialized 1.
Implementing secure serialization by generating a secure object hash or using encryption can help to protect sensitive data and prevent unauthorized access to serialized objects 1.
upvoted 1 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
ASPushkin
4 months agod7bb0b2
6 months, 1 week agoOmnisumem
9 months agoStavok
11 months, 3 weeks ago