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

Quiz: Design Patterns · Question 4 of 10

Your code expects send(phone, text) but a vendor library offers pushmessage(payload). Which pattern connects them?

Your code expects send(phone, text) but a vendor library offers push_message(payload). Which pattern connects them?

  1. A.Builder
  2. B.Adapter
  3. C.Strategy
  4. D.Singleton
Answer & explanation

Correct answer: Adapter

An adapter converts one interface into the one your code expects.

Can you get the rest right without peeking?

Take the timed Quiz: Design Patterns quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →