Was ist Delegation in Java
you use an object of another class as an instance variable, and forward messages to the instance.
for example:
public class Shop {
List<Banana> bananas = new ArrayList<>();
public void add(Banana banana){
bananas.add(banana);
}
}
Tense Turtle