Skip to main content
Link and association in JAVA
- Link and Association are the means for establishing relationship among objects and classes.
- Link and Association often appears as verbs in problem statement.
- Link is physical / conceptual connection among objects most links relate two objects, but some links relate three or more object. It is am instance of association as shown in figure below.
- Association is a description of a group of links with common structure and common semantics as in the class diagram shown in figure below.
- Association are indirectly bidirectional.
- Both the direction of traversal is equally meaningful.
- It is the only name of the association that established the direction.
- Developers often implements association in programming language as a references from one object to another.
- Associations are important, precisely because they break encapsulation.
- Association cannot be private to a class, because they go beyond classes.