exam questions

Exam 1z0-819 All Questions

View all questions & answers for the 1z0-819 exam

Exam 1z0-819 topic 1 question 148 discussion

Actual exam question from Oracle's 1z0-819
Question #: 148
Topic #: 1
[All 1z0-819 Questions]

Which two can be considered good practices for serializing Java objects? (Choose two.)

  • A. Assign null value by default while serializing and deserializing a transient variable.
  • B. Ensure that the class definition used is the same as the class definition used by Java runtime at the time when the object was serialized.
  • C. Always override the readObject/writeObject methods from the java.io.Serializable interface.
  • D. Implement secure serialization by generating secure object hash or using encryption.
  • E. Implement serialization for long-term data storage.
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
ASPushkin
4 months ago
Selected Answer: D
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
upvoted 1 times
...
d7bb0b2
6 months, 1 week ago
Selected Answer: BD
CORRECT ANSWERD
upvoted 1 times
...
Omnisumem
9 months ago
Selected Answer: BD
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.
upvoted 2 times
...
Stavok
11 months, 3 weeks ago
Selected Answer: BD
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
...
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago