Results 1 to 4 of 4
  1. #1
    mindus is offline Member
    Join Date
    Sep 2010
    Posts
    2
    Rep Power
    0

    Default Composition vs inheritance

    Hi
    Can anybody tell me at what situation we have to go for composition instad of using inheritance.


    Can anybody explain in detail


    Thanks
    mindus

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    Please stick with a one post. Do not post the same question multiple times in different sub-forums.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    Quote Originally Posted by mindus View Post
    Hi
    Can anybody tell me at what situation we have to go for composition instad of using inheritance.


    Can anybody explain in detail
    Yes, Google can, and in fact a simple Google search brought me many fine tutorials and examples such as this one: Composition and Inheritance

    If after reviewing this and other tutorials you are still confused, please feel free to come on back and ask any questions you want. But please note that general and broad questions are often best answered by referring the poster to Google or a tutorial or two (no one here wants to re-write a tutorial that has already been well written elsewhere) while more specific questions are often answered more directly.

    Much luck!

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

Similar Threads

  1. composition Vs Inheritance
    By mindus in forum New To Java
    Replies: 1
    Last Post: 09-26-2010, 07:53 PM
  2. association vs composition vs aggreagation
    By waqar100 in forum New To Java
    Replies: 2
    Last Post: 06-10-2010, 10:17 PM
  3. I need some help with composition, i think
    By Nerijus in forum New To Java
    Replies: 2
    Last Post: 03-04-2010, 06:24 PM
  4. inheritance
    By itaipee in forum New To Java
    Replies: 6
    Last Post: 01-20-2009, 08:18 PM
  5. What is the Composition in Java
    By Santoshbk in forum Advanced Java
    Replies: 4
    Last Post: 04-10-2008, 11:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •