What is a POJO? Answer:Plain Old Java Object
POJO is a Java objct not bound by any restriction other than those forced by the Java Language Specification. Properties of POJO:
All properties must public setter and getter methods
All instance variables should be private
Should not Extend prespecified classes.
Should not Implement prespecified interfaces.
Should not contain prespecified annotations.
It may not have no argument constructor
Example of POJO:
public class POJO {
private String value;
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}