what distinguish java beans from java classes?

A JavaBeans is software component that is written in Java programming language. It is similar to Java class except for following differences:

* A JavaBean must adhere to certain convention regarding property and event interface definition whereas java class need not be.
* A builder tool must be able to analyze how Beans works through introspection process.This is not necessarily to be true in case of a java class.
* Java Beans must implement a serializable interface which is not necessary for Java classes.
* Every java Beans must have one public no.argument constructor which is not true for Java classes.
           
 In conclusion, it can be said that a Bean is a Java class, but a Java class may not be a Bean. Thus Beans is a specific java class and has rules that have to be followed, called design patterns.  

Comments

Popular posts from this blog

psychology two questions n their answer

thread