🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: UML Class Diagrams: all 10 questions

Quiz: UML Class Diagrams · Question 5 of 10

A dashed line with a hollow triangle from UpiPayment to «interface» Payment becomes which Java code?

A dashed line with a hollow triangle from UpiPayment to «interface» Payment becomes which Java code?

  1. A.class UpiPayment extends Payment
  2. B.class UpiPayment implements Payment
  3. C.class Payment implements UpiPayment
  4. D.A field of type Payment inside UpiPayment
Answer & explanation

Correct answer: class UpiPayment implements Payment

A dashed line with a hollow triangle is realization: implementing an interface.

Can you get the rest right without peeking?

Take the timed Quiz: UML Class Diagrams quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →