What is a JavaBean exactly?

I understood, I think, that a “Bean” is a Java-class with properties and getters/setters. As much as I understand, it is the equivalent of a C struct. Is that true? Also, is there a real syntactic difference between a JavaBean and a regular class? Is there any special definition or an Interface? Basically, why is … Read more

What is a JavaBean exactly?

A JavaBean is just a standard All properties are private (use getters/setters) A public no-argument constructor Implements Serializable. That’s it. It’s just a convention. Lots of libraries depend on it though. With respect to Serializable, from the API documentation: Serializability of a class is enabled by the class implementing the java.io.Serializable interface. Classes that do not implement this interface will not … Read more