Association is a relationship between two separate classes which can be of any type say one to one, one to may etc. It joins two entirely separate entities. Aggregation is a special form of association which is a unidirectional one way relationship between classes (or entities), for e.g. Wallet and Money classes. read more
Associations can be described as a "has-a" relationship because the typical implementation in Java is through the use of an instance field. The relationship can be bi-directional with each class holding a reference to the other. Aggregation and composition are types of association relationships. read more
Type of association: Composition is a strong Association whereas Aggregation is a weak Association. // Java program to illustrate the // difference between Aggregation // Composition. import java.io.*; // Engine class which will // be used by car. so 'Car' // class will have a field // of Engine type. read more
What is Association in Java By chandrashekhar | 2018-05-09T02:29:30+00:00 April 7th, 2015 | OOPS | 0 Comments An object is a real-world entity like a pen, table, book and many more. read more