my dog learned polymorphism
The moose likes Beginning Java and the fly likes Java file / Java bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java file / Java bean" Watch "Java file / Java bean" New topic

Java file / Java bean

aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
when is a Java file a Java bean
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
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

Joined: Feb 27, 2002
Posts: 8927

serialisation support.

I dont think serialization support is mandatory.

Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
You might want to take a look at the JavaBeans Trail of Sun's Java Tutorial.

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
I agree. Here's the link:
subject: Java file / Java bean
It's not a secret anymore!