问题
I have many doubts in POJO. And seek for a clear definition with a tiny example.
回答1:
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. :)
回答2:
pojo : plain old java object
dojo : http://dojotoolkit.org/ A javascript ajax framework though has nothing to do with java
EDIT 1:
eg. for pojo class:
public Customer{
private String name;
private String surname;
public String getName(){
return name;
}
public String getSurname(){
return surname;
}
public void setName(String name){
this.name=name;
}
public void setSurname(String surname){
this.surname=surname;
}
}
回答3:
POJO = plain old java object == Java object, which has no technological dependence on any framework etc.
DOJO = I know only about this javascript framework...
来源:https://stackoverflow.com/questions/11722251/what-is-pojo-dojo-in-java