# What do you mean by aggregation?

URL: https://answers.mindstick.com/qa/30602/what-do-you-mean-by-aggregation

What do you [mean](https://www.mindstick.com/forum/161453/what-is-node-js-and-why-is-it-used-in-mean) by [aggregation](https://www.mindstick.com/forum/217/what-is-aggregation-and-how-it-maps-into-a-java-class)?

## Answers

### Answer by Arti Mishra

**"Aggregation in Java "**\

In Java Aggregation, represent a relationship between two classes that are used to **describe the “has-a" relationship** between objects. It is a more **flexible and advanced version of the association**. It contains the address of another class and each class is considered as a **part of the aggregation class.** And the reusability of code is achieved by aggregation if there is no “is-a” relationship. Aggregation represents a relationship where the child can exist independently of the parent class. For Example, if you create a class (parent) and the second class is a child, and delete the class parent then the child exists. Aggregation implies a relationship where the child can exist independently of the parent. Example: Class (parent) and Student (child). Delete the Class and the Students still exist. \

