This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Java in General and the fly likes Association /aggregation/composition Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Association /aggregation/composition" Watch "Association /aggregation/composition" New topic

Association /aggregation/composition

Nilesh Deshpande
Ranch Hand

Joined: Jan 11, 2006
Posts: 36
I am bit confused about the relation between association /aggregation/composition.

I can define the aggregation in following code. Please help me to define the other two.
Class A{
class B {
A a =new A();

Thanks in advance.
Deepak Bala

Joined: Feb 24, 2006
Posts: 6662

Here you go dude ! Its c++ but its UML all the same.

UML concepts

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Bert Bates

Joined: Oct 14, 2002
Posts: 8898
We're going to move this over to the intermediate forum - these topics aren't on the SCJP exam.

Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
I agree. Here's the link:
subject: Association /aggregation/composition
jQuery in Action, 3rd edition