A "POJO" is an ordinary Java Object which does not follow any of the major Java object models, conventions, or frameworks.
A "POJO" however is bound by the restrictions forced by the Java Language Specification.
A "POJO" however is bound by the restrictions forced by the Java Language Specification.
Some of these restrictions are ...
- A POJO cannot extend any Class
- A POJO cannot implement any Interface
- A POJO cannot contain any prespecified annotation
An example of a simple POJO may be ...
public class POJO { private String someProperty; public String getSomeProperty() { return someProperty; } public void setSomeProperty(String someProperty) { this.someProperty = someProperty; } }
No comments:
Post a Comment