I know that variables are made private in simple pojos so as to implement the concept of encapsulation. But my question is why do we do that if we indirectly access the same object's variable through getters and setters to either get the value or modify it. We can even directly access by the variable without making it private which also accounts to lesser code.