What is the difference between POJO (Plain Old Java Object) and DTO (Data Transfer Object)?

Viewed 28689

I cannot find difference between them. Does anyone know how to differentiate them?

8 Answers

All DTOs are POJOs, but not all POJOs are DTOs. An example of POJO that is not a DTO is a business class that contains state and behavior (business logic).

Related