🎙 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 6 of 10

What is the key difference between Adapter and Decorator?

What is the key difference between Adapter and Decorator?

  1. A.Adapter adds features; Decorator changes the interface
  2. B.They are the same pattern
  3. C.Adapter changes an interface to match another; Decorator keeps the same interface and adds behaviour
  4. D.Decorator is creational, Adapter is behavioural
Answer & explanation

Correct answer: Adapter changes an interface to match another; Decorator keeps the same interface and adds behaviour

A decorated object can be used exactly like the original.

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 →