+ 3
Association, composition, aggregation in java
Is there any special keyword or piece of code used for aggregation composition and Association like we use extends for inheritance?
1 Antwort
+ 1
No, because as code it can be same and it depends in context.
If I speculate about it,
aggregation is closer to reference types and there is usually keyword 'new'. Or generic <> diamond can be there
composition might be more with 'final' keyword
but these are not rules