Discussions

General J2EE: Difference Between java bean And POJO

  1. Difference Between java bean And POJO (2 messages)

    Hi,

         What is meant by POJO and java bean in the sense that we can have object of a java bean.

     can any one fed light on this topic

    Thnakz
     Arun k s
  2. The Java-Beanness of a POJO is that it's public attributes are all accessed via getters and setters that conform to the JavaBeans conventions.
    e.g.
    private String foo;
    public String getFoo(){...}
    public void setFoo(String foo){...};
  3. JavaBean restrictions[ Go to top ]

    Additionally, true JavaBeans must implement Serializable and have a no-argument constructor. POJOs don't have these restrictions.