- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the difference between compositions and aggregations in Java?
In Aggregation relationship among classes by which a class (object) can be made up of any combination of objects of other classes. It allows objects to be placed directly within the body of other classes.
A composition is also a type of aggregation where the relationship is restrictive i.e. If two objects are in composition, the composed object will not exist without the other.
- Related Articles
- What is Data Cube Aggregations?
- What is the difference between Java and Core Java?
- What is the difference between Java and Java EE
- What is the difference between >> and >>> operators in Java?
- What is the difference between /* */ and /** */ comments in Java?
- What is the difference between Java and JavaScript?
- What is the difference between object and reference in java?
- What is the difference between Serialization and Deserialization in Java?
- What is the difference between System.out.println() and System.out.print() in Java?
- What is the difference between PATH and CLASSPATH in Java?
- What is the difference between ArrayList and LinkedList in Java?
- What is the difference between abstraction and encapsulation in Java?
- What is the difference between transient and volatile in Java?
- What is the difference between equals and compareTo in Java?
- What is the difference between StringBuffer and StringBuilder in java?

Advertisements