Why we have private data and public getters setters to access them

It is common norm in Object oriented languages like Java to keep data which belongs to class as private and provide a public interface in the form of getter and setter method to access the data.

This wrapping up of data and methods which act on this data within single class has been named as encapsulation.In this post,let us try to understand what is the benefit we achieve out of keeping data private and with public getter ,setters to access data.