This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What is the Advantage of java bean  RSS feed

 
Harish Tiruvile
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

Can any one tell me the advantage of javabean {..i.e a class with getter and setter method(Other than encapsulation)}
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37261
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Harish,
Encapsulation is a pretty big advantage. Often people add methods/logic to the JavaBean, but I'll assume you are talking about one with just getters and setters.

Another big advantage is that it provides common conventions. When you use a library, it can dynamically look up fields knowing you followed these conventions.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!