---
title: "What is Aggregation and how it maps into a Java class?"  
description: "What is Aggregation and how it maps into a Java class?"  
author: "Rajesh Goswami"  
published: 2011-04-16  
updated: 2011-04-16  
canonical: https://www.mindstick.com/forum/217/what-is-aggregation-and-how-it-maps-into-a-java-class  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# What is Aggregation and how it maps into a Java class?

[Aggregation](https://www.mindstick.com/forum/34071/use-aggregation-operator-max-in-linq) show the part of [relationship](https://yourviews.mindstick.com/view/80819/live-in-relationship-protecting-the-right-to-live-together) how use it in [java](https://www.mindstick.com/articles/12214/web-development-company-in-india-laid-on-the-foundation-of-concrete-java-programming) or [mapping](https://www.mindstick.com/forum/34816/what-is-mapping-constraints-in-database-management-system) with java [class](https://www.mindstick.com/blog/165/generic-class-in-c-sharp)?

## Replies

### Reply by Amit Singh

An Aggregation is an Association which denotes an **"is part of"** relationship.\
\
Take a 'Car', for example, it is consisted of an engine,a steering wheel, four tires,seats,gear box,fuel tank,engine oil tank, air filters etc.So all constituents of car are parts of it.\
\
If a car is destroyed/smashed, its parts can still be used separately as spares in other cars,so these parts have individual use even when their conatiner entity is destroyed.\
\
**Example\**

```
class Car{List getTires();List getSeats();List getAllParts();}
```


---

Original Source: https://www.mindstick.com/forum/217/what-is-aggregation-and-how-it-maps-into-a-java-class

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
