Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Java by (10.2k points)

I'm not sure about the difference. I'm using Hibernate and, in some books, they use JavaBean and POJO as an interchangeable term. I want to know if there is a difference, not just in the Hibernate context, but as general concepts.

1 Answer

0 votes
by (46k points)

A JavaBean observes certain rules. Getter/setter naming, having a public default constructor, being serializable, etc. See JavaBeans Conventions for more details.

A POJO (plain-old-Java-object) isn't rigorously established. It's a Java object that doesn't have a requirement to implement a special interface or derive from a particular base class, or make use of appropriate annotations to be compatible with a given framework, and can be any arbitrary (often relatively simple) Java object

Related questions

0 votes
1 answer
asked Jun 20, 2019 in Java by Krishna (2.6k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...