>>1275180Do you understand what an interface in java is?
Well an adapter is used when you could not directly use an already existing interface with another apllication/ object/ class/ wahtever because missing parts like methods or the methods do not work in a way the interface expects. It makes them compatible by doing conversions, providing the methods etc so to the interface everything looks fine.
YOu need it whenever you want to connect an existing element to another one over an interface for which things are missing.
Because if you are currently developing that element you could of course in theory design it in a way that is by itself compatible - but that hinders modularity, you want to be able to use your basic module for sevearal cases and some may demand functions the original module did not have - an adapter allows to connect the two anyway.