Oracle
1Z0-851 · Question #34
Which Man class properly represents the relationship "Man has a best friend who is a Dog"?
The correct answer is D. class Man { private Dog bestFriend; }. See the full explanation below for the reasoning.
Question
Which Man class properly represents the relationship "Man has a best friend who is a Dog"?
Options
- Aclass Man extends Dog { }
- Bclass Man implements Dog { }
- Cclass Man { private BestFriend dog; }
- Dclass Man { private Dog bestFriend; }
- Eclass Man { private Dog<bestFriend>; }
- Fclass Man { private BestFriend<dog>; }
How the community answered
(28 responses)- A4% (1)
- B14% (4)
- C4% (1)
- D71% (20)
- F7% (2)
Community Discussion
No community discussion yet for this question.