exam questions

Exam 1z0-819 All Questions

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

Exam 1z0-819 topic 1 question 70 discussion

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

Given:

public interface Builder {
public A build(String str);
}

and



Assuming that this code compiles correctly, which three statements are true? (Choose three.)

  • A. A cannot be abstract.
  • B. A cannot be final.
  • C. B cannot be abstract.
  • D. B cannot be final.
  • E. B is a subtype of A.
  • F. A is a subtype of B.
Show Suggested Answer Hide Answer
Suggested Answer: BCE 🗳️

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
6 months, 2 weeks ago
Selected Answer: BCE
answer: EBC E correct the signature of the implementation method must be the same the return type must be compatible(covariant) between the implementation and interface methods -- B correct because of E -- C correct return new B(str) Abstract classes cannot be instantiated
upvoted 1 times
...
mendjijet
12 months ago
Selected Answer: BCE
BCE are correct
upvoted 1 times
...
d7bb0b2
1 year ago
B. A cannot be final (So B in impl throw compilation error because B cannot extends A) C. B cannot be abstract (so cannot do new B()). E. B is subclass of A (method is overriding so then => B is A
upvoted 2 times
...
d7bb0b2
1 year, 1 month ago
B. A cannot be final. C. B cannot be abstract. E. B is a subtype of A.
upvoted 1 times
...
Stavok
1 year, 6 months ago
Selected Answer: BCE
The correct answers are B. A cannot be final, C. B cannot be abstract, and E. B is a subtype of A. Since the code compiles correctly, the method build in the BuilderImpl class must be a valid implementation of the method declared in the Question70 interface. This means that the return type of the build method in the BuilderImpl class, which is B, must be a subtype of the return type of the build method in the Builder interface, which is A. Therefore, option E is correct.
upvoted 2 times
...
Mukes877
1 year, 7 months ago
Selected Answer: BCE
correct answer is B,C,E
upvoted 1 times
...
Adel2023
1 year, 8 months ago
Selected Answer: BCE
correct answer is B,C,E
upvoted 2 times
...
xuancat
1 year, 8 months ago
Selected Answer: BCF
B, C, F
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