exam questions

Exam 1z0-829 All Questions

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

Exam 1z0-829 topic 1 question 41 discussion

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

Given the Product class:
and the Shop class:

What is the result?

  • A. Compilation fails.
  • B. Cookie 0.0 2.99
  • C. Cookie 2.99 2.99
  • D. Cookie 3.99 2.99
  • E. An exception is produced at runtime.
  • F. Cookie 0.0 0.0
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
SrinivasJasti
2 weeks, 1 day ago
Selected Answer: B
The Java Serialization API is designed to recognize only a private readObject method for deserialization purposes. Since it is public ,loses its special status in the serialization process.The transient fields are not restored to their intended values threfore price remains 0.0 leading to Cookie 0.0 2.99
upvoted 1 times
...
Langton
2 months, 1 week ago
Answer is B because for readObject() method to be called it has to be difined as private which is not the case here
upvoted 2 times
...
xplorerpj
6 months, 3 weeks ago
Selected Answer: B
B is correct
upvoted 1 times
...
supersquax
11 months, 2 weeks ago
B correct, verified in online compiler!
upvoted 3 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