nerdexam
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)
  • A
    4% (1)
  • B
    14% (4)
  • C
    4% (1)
  • D
    71% (20)
  • F
    7% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-851 Practice