What Is Composition?



What Is Composition?..

Answer / Rohitash Kumar Meena

In Core Java, Composition refers to a composite relationship between two classes where one class has an object of another class as a member variable. It is also known as Aggregation.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

what are three ways in which a thread can enter the waiting state? : Java thread

1 Answers  


What is a "pure virtual" member function?

1 Answers   Amazon,


What are order of precedence and associativity, and how are they used?

1 Answers  


Hey buddy.. can you please tell me about the use of marker interface? And is there any link between marker interface and factory methods? Thanks in advance.

2 Answers  


What is ellipsis in java?

1 Answers  


What is final modifier?

1 Answers  


Can a for statement loop indefinitely?

3 Answers  


What is Overriding and how can it be used?

7 Answers   Consagous, Wipro,


What is difference between hashset and hashmap in java?

1 Answers  


What if constructor is protected in java?

1 Answers  


Which variables are stored in heap?

1 Answers  


Can we override the private methods?

1 Answers  


Categories