What is POJO & DOJO in JAVA?

JDGuide picture JDGuide · Jul 30, 2012 · Viewed 94.7k times · Source

I have many doubts in POJO. And seek for a clear definition with a tiny example.

Answer

Nishant picture Nishant · Jul 30, 2012

POJO Plain Old Java Object. Basically a class with attributes and it's getters and setters.

public class User{
 private String name;
 private int age;

 public void setName(String name){
    this.name = name;
 }

 public String getName(){
    return this.name;
 }

 //same for age

}

DOJO haven't heard of it. A JavaScript framework. :)