OOPS in JAVA 12
Aggregation in Java
If a class have an entity reference, it is known as Aggregation. Aggregation represents HAS-A relationship.
Example:
class Employee{
int id;
String name;
Address address; //Address is a class
...
}
Example:
class Employee{
int id;
String name;
Address address; //Address is a class
...
}
Dinesh Kumar S is a 23-year-old System Administrator who enjoys playing games, listening to music and learning new technology. He is friendly and generous, but can also be very lazy and crazy.