Java bean class
<p>Bean class /encapsulation means variable should be private &amp; getter &amp; setter should be public. Because of the reason data hiding.Anybody can't access this variable out side.</p>

<p>My Question is :`With the getter/setter method we can access/set variable from outside class.Then why we need to keep that variable private &amp;&amp; how we can tell this is data-hiding? </p>

<p>Actually i like to get some explanation because , without any idea just i am doing project like this.
Please if there are any mistake or unclear question, please forgive me. </p>

<p>Please anybody explain this. </p>

<p>Thanks in advance</p>
