exam questions

Exam 1z0-819 All Questions

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

Exam 1z0-819 topic 1 question 169 discussion

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

Given:



and



and



Which code, when inserted at one or more marked position, would allow classes B and C to compile?

  • A.
  • B.
  • C.
  • D. public void z() { } // position 3
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
cathDev
3 months, 3 weeks ago
Selected Answer: D
D is correct . C is not correct. method x needs to be public not private package
upvoted 1 times
...
ASPushkin
5 months, 2 weeks ago
Selected Answer: D
see my answer below
upvoted 1 times
...
Samps
6 months, 1 week ago
C is the correct answer. tricky as method x() with weaker access is part of option B and not C.
upvoted 1 times
...
d7bb0b2
6 months, 1 week ago
Selected Answer: D
C => is incorrect x() can't has weaker access privileges D= > only needs implement z because in superclass is abstract in position /*1 *! nothing is need
upvoted 1 times
...
ASPushkin
7 months, 4 weeks ago
answer : D class C implements interface A And method x() comes from class B abstract class B { public void x() {} public abstract void z(); } class C extends B implements A { public void z() {} } -------- C is wrong method x() in class C can not has weaker access privileges A and B are wrong too @Override on position 2 is not good There is no super class for class B
upvoted 1 times
...
dilleman
9 months, 2 weeks ago
D is correct. C is not correct since void x is public in Class B and has a weaker privilege in class C so this wont compile.
upvoted 2 times
...
[Removed]
10 months, 3 weeks ago
Selected Answer: C
C is correct as C needs to override both z() and x()
upvoted 1 times
...
Stavok
12 months ago
Selected Answer: C
C is Correct TESTED
upvoted 1 times
...
KiraguJohn
1 year ago
Answer is B
upvoted 1 times
Adel2023
12 months ago
answser is D
upvoted 2 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