According to definitions I find in the internet a JavaBean is a Java class that satisfies these conditions:
- All instance attributes are private
- All instance attributes have public getters and setters
- The class has a parameterless constructor
- The class implements the Serializable interface
What I would like to know is that if I add method to a Javabean can we still call it a Javabean?
For exemple can we say that the following class is a JavaBean?
public class Person implements Serializable {
private String name;
public Person(){}
public String getName(){...}
public void setName(String name){...}
public void sayHello(){}
}