Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between Java Bean and Java Class

 
R Bhatia
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Tell me Difference between Java Bean and Java Class..
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
read the bean specification, it contains the answer...

to summarise: a bean is a class that adheres to certain rules (for those, see the bean specification).
 
Logan Owen
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, technically speaking...insn't a Java Bean merely a piece of code that is reusable?

Components (JavaBeans) are reusable software programs that you can develop and assemble easily to create sophisticated applications. JavaBeans technology is based on the JavaBeans specification.


Googling for "Java Bean" is helpful...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64835
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
insn't a Java Bean merely a piece of code that is reusable?


No. Any Java class can be deemed "reusable". As Jeroen pointed out there are a stringent set of rules and conventions that must be followed for a class to be considered a "bean".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic