This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Bean Inheritance

 
Rob Qas
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear all,
i have a situation that i have beans that share some data i did a super class wiche contain these data but i think its not the right way i thought of composition then of sending the general class to the constructor and setting the general data can any body please help me in the best practice in this situation
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you think that inheritance is not the right way to do it?
 
Rob Qas
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cose i think it loose the generalization in inheritance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic