Composition is an Association
Aggregation is an Association
Composition is a strong Association (If the life of contained object totally depends on the container object, it is called strong association)
Aggregation is a weekweak Association (If the life of contained object doesn't depends on the container object, it is called weekweak association)
Example:
class Contained { public void disp() { System.out.println("disp() of Contained A"); } } public class Container { private Contained c; //Composition Container() { c = new Contained(); } //Association public Contained getC() { return c; } public void setC(Contained c) { this.c = c; } public static void main(String[] args) { Container container = new Container(); Contained contained = new Contained(); container.setC(contained); } }