top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between POJO and Bean in Java?

0 votes
497 views
What is the difference between POJO and Bean in Java?
posted Feb 28, 2018 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

POJO - Plain Old Java Object

All JavaBeans are POJOs but not all POJOs are JavaBeans.

A JavaBean is a Java object that satisfies certain programming conventions.

*The JavaBean class must implement either Serializable or Externalizable.
*The JavaBean class must have a public no-arg constructor.
*All JavaBean properties must have public setter and getter methods (as appropriate).
*All JavaBean instance variables should be private.
answer Mar 2, 2018 by Madu Hansi
...