0 votes
in JAVA by
Difference between Adapter and Decorator pattern?

1 Answer

0 votes
by

Though the structure of Adapter and Decorator pattern is similar, the difference comes on the intent of each pattern. The adapter pattern is used to bridge the gap between two interfaces, but Decorator pattern is used to add new functionality into the class without the modifying existing code.

Related questions

0 votes
asked Oct 17, 2019 in Design Patterns by Robin
+3 votes
asked May 13, 2021 in JAVA by rajeshsharma
...