exam questions

Exam 1z0-819 All Questions

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

Exam 1z0-819 topic 1 question 188 discussion

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

Given:

class Animal { }
class Dog extends Animal { }
class Petdog extends Dog { }

and



Which two statements inserted independently on line 3 will make this code compile? (Choose two.)

Show Suggested Answer Hide Answer
Suggested Answer: BC 🗳️

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
d7bb0b2
6 months, 4 weeks ago
Selected Answer: A
House<Dog>, House<Animal> , House<Object> , House(implicit object) because they are super class of Dog
upvoted 1 times
ASPushkin
6 months, 2 weeks ago
House<Object> is not allowed class Animal{} class Dog extends Animal{} class Predog extends Dog{} class House<A extends Animal> { public House<? super Dog> build(A a) { return .. } } generic method return parameter : House <? super Dog> has super type realtionship with House<Dog>, House<Animal>, House<Object>, House<> type class parameter : <A extends Animal> following types are within bounds of type-varaible A. And it allows : House<Dog>, House<Animal>, House<Predog>, House<> so intersection is House<Dog>, House<Animal>, House<>
upvoted 1 times
...
ASPushkin
6 months, 2 weeks ago
House<Object> is not allowed. Checked
upvoted 2 times
...
...
d7bb0b2
7 months ago
only can return : House<Dog>, House<Animal> , House<Object> , House(implicit object) because they are super class of Dog
upvoted 1 times
...
d7bb0b2
7 months ago
The answered is same for all options
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