Friday, March 30, 2012

What is POJO?

What is POJO?
POJO means Plain-Old Java Object. POJOs are "simple" Java objects to represent business logic. In contrast to classes that extend complex frameworks behaviors, such as Servlets or  EJBs, a POJO shouldn' t implement interfaces or extend abstract classes of these frameworks.

E.g.:
public class Person{
     private String name;
     public String getName() { return name; }
     public void setName(String n){ name = n; }
}

No comments:

Post a Comment

Please, before starting to comment, evaluate if what you want to write is useful, respectful and positive. A kid may read this also.

Give a good example!