Skip to content
Sharp

Design patterns · interview question

How does the Adapter pattern help in integrating third-party libraries?

Multiple choiceMediumchapter-13-curatedpremiumdesign-patternsproxy-and-adapter
Choose one answer
Answer and explanation

Correct answer

C. By wrapping the library to match the client's expected interface.

Why

The Adapter pattern wraps a third-party library to match the client's expected interface, making the library usable without modifying its code. It essentially translates the interface for compatibility.

Test yourself on Design patterns

A free test with instant, explained results. No account needed.

Start free test
All Design patterns questions →