Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is aggregation and composition ?



What is aggregation and composition ?..

Answer / balbir

Aggregation differs from ordinary composition in that it
does not imply ownership. In composition, when the owning
object is destroyed, so are the contained objects. In
aggregation, this is not necessarily true. For example, a
university owns various departments (e.g., chemistry), and
each department has a number of professors. If the
university closes, the departments will no longer exist,
but the professors in those departments will continue to
exist. Therefore, a University can be seen as a composition
of departments, whereas departments have an aggregation of
professors. In addition, a Professor could work in more
than one department, but a department could not be part of
more than one university

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More Core Java Interview Questions

what's diff between struts 1.1 & 1.2

3 Answers   Wipro,


What are the three parts of a lambda expression? What is the type of lambda expression?

0 Answers  


What are scalar data types?

0 Answers  


What is an eror in java?

0 Answers  


What are the override methods in Object class?

2 Answers   Tech Mahindra, Wipro,


. What are the differences between constructor and method of a class in Java?

1 Answers  


What are local variables?

0 Answers  


Explain the difference between the Boolean & operator and the && operator?

1 Answers  


What is a condition in programming?

0 Answers  


What is a percentage sign called?

0 Answers  


Why to give the file name same as the public class name in java?

3 Answers  


Difference between a MenuItem and a CheckboxMenuItem?

1 Answers  


Categories