Answer:
JavaBeans are a special Java class file.
Step-by-step explanation:
JavaBeans are special reusable java classes with the following properties:
- They are Serializable.
- They contains private fields with public getter and setter functions.
- Their constructor is public.
For example:
//Sample JavaBean class
public class MyBean {
//Private field
private String myProperty;
//Constructor
public MyBean(){}
// Setter method
public void setMyProperty(String myProperty)
{
this.myProperty = myProperty;
}
//Getter method
public String getMyProperty()
{
return myProperty;
}
}