What is POJO in Java and how do you create it? - ProProfs Discuss
Advertisement

What is POJO in Java and how do you create it?

What is POJO in Java and how do you create it?

Change Image    Delete

Asked by C.Emily, Last updated: Nov 22, 2024

+ Answer
Request
Question menu
Vote up Vote down

2 Answers

B. Mary

B. Mary

Health comes first, and I happen to know a lot about health.

B. Mary
B. Mary, Health Care manager, MHA(Master's In Healthcare Administration), Raleigh, North Carolina

Answered Dec 02, 2019

POJO is a part of program engineering. It stands for Plain Old Java Object. It is a normal and ordinary object. POJO has no special role. It also does not use any special interfaces, nor does it use any of the frameworks of Java.

Josh MacKenzie, Martin Fowler, and Rebbecca Parsons are credited for coining this term. The purpose of creating this acronym was to give the objects a fancy name.

They felt if it had a fancy name, more people would feel that it should be used, despite being a normal or ordinary object. Its purpose is to promote the use of API developments instead of implementations.

upvote downvote
Reply 

C. Reyes

C. Reyes

C. Reyes
C. Reyes

Answered Jun 14, 2018

POJO means Plain Old Java Object. This data structure is made out of setters and jetters. Using this will get rid of some methods for the other objects used. This does not have its own behavior. This is a very simple thing that you can do in Java. The moment that you add some more points or if you start adding multiplication, then you will lose the POJO. It will not be POJO anymore.

It can be confusing to understand POJO in the beginning but the moment that you understand what you can use it for or how useful the methods will be based on the field name and type, you can use it more often.

upvote downvote
Reply