Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java file / Java bean

 
aakash bhatt
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when is a Java file a Java bean
Regards,
aakash
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never
A Java Bean is a class (and more properly an instance of such a class) that conforms to the standards set for Java Beans, which basically means getters and setters called getXXX and setXXX for all public properties and serialisation support.
Therefore the java file (either source or compiled source) is not a bean, though a bean can be loaded from a file defining a class that conforms to the Bean specifications.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
serialisation support.

I dont think serialization support is mandatory.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to take a look at the JavaBeans Trail of Sun's Java Tutorial.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic