Question: how pojo works in java?
Answer: Your class appears to already be a POJO. POJO class acts as a bean which is used to set and get the value. When you aren't doing anything to make your class particularly designed to work with a given framework, ORM, or other system that needs a special sort of class, you have a Plain Old Java Object, or POJO.