My understanding of the adapter design pattern is that we are allowing an interface from an existing class to be used as another interface.
So every time we extend or implement a class in java we are using the adapter pattern? So this bit of code here is using the adapter design pattern?
public class car extends flyingMachine{
void drive(){}
@override
void fly(){}
}
There is lots of information on the pattern online but nothing that clarifies this question for me.
Aucun commentaire:
Enregistrer un commentaire