Difference between DTO, VO, POJO, JavaBeans?

后端 未结 7 1752
误落风尘
误落风尘 2020-11-22 07:46

Have seen some similar questions:

  • What is the difference between a JavaBean and a POJO?
  • What is the Difference Between POJO (Plain Old Java Object) an
7条回答
  •  失恋的感觉
    2020-11-22 08:24

    POJO : It is a java file(class) which doesn't extend or implement any other java file(class).

    Bean: It is a java file(class) in which all variables are private, methods are public and appropriate getters and setters are used for accessing variables.

    Normal class: It is a java file(class) which may consist of public/private/default/protected variables and which may or may not extend or implement another java file(class).

提交回复
热议问题