Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Oracle Exam 1Z0-819 Topic 8 Question 87 Discussion

Actual exam question for Oracle's 1Z0-819 exam
Question #: 87
Topic #: 8
[All 1Z0-819 Questions]

Given:

It is required that if p instanceof Pair then p.isValid() returns true.

Which is the smallest set of visibility changes to insure this requirement is met?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Charlie
14 hours ago
I'm feeling a bit pair-anoiac about this question. But Option D seems like the way to go. Gotta keep those private parts, well, private!
upvoted 0 times
...
Marleen
6 days ago
Hmm, this is a tricky one. I'd go with Option D too, just to be on the safe side. Can't have those pesky outside influences messing with my Pair object!
upvoted 0 times
...
Katie
17 days ago
Option D looks like the best choice to ensure the requirement is met. Encapsulating the left and right fields, and making the setters private, would prevent direct access and maintain the validity constraint.
upvoted 0 times
...
Quentin
23 days ago
But if left and right are private, then setLeft and setRight should also be private to maintain encapsulation.
upvoted 0 times
...
Felicia
25 days ago
I disagree, I believe the answer is D) left, right, setLeft, and setRight must be private.
upvoted 0 times
...
Quentin
26 days ago
I think the answer is B) left and right must be private.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77