Tag: adapter

  • How to implement Adapter pattern in Java?

    Let’s say you love nuts. You buy them every now and then from a vendor named Raghav. You buy it online through a java program which calls Raghav’s shop API. Let’s say you have created a Shop interface to represent Raghav’s shop and created a class RaghavShop implementing it. And you have declared a method…