JavaBeans are reusable software component written in java.The components can be configured and connected using builder tools.Three key properties that causes any class in java to become a javabean is
1.Class is serializable
2.class has a 0 argument constructor
3.class has getter and setter methods for data members
Here is a simple class that is eligible for becoming a javabean
import java.io.*;
public class Student implements Serializable {
private String name = null;
//0 argument constructor
public Student() {
}
//getter method
public String getName() {
return name;
}
//settor method
public void setName(final String name) {
this.name = value;
}
}