title: Getter and Setter in Java
body: <p>In my code I'm parsing a JSON Object and in a constructor and I'm using get and set methods to assign those values to variables.</p>
  
  <p>Now the problem is the value printed in the set methods return the value in the proper way. But the value which is printed in get methods returning NULL even after assigning those parsed values to them.</p>
  
  <p>Get &amp; set methods
  <a href="https://i.stack.imgur.com/jLZaK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jLZaK.png" alt="get &amp; set methods"></a></p>
  
  <p>Output
  <a href="https://i.stack.imgur.com/kWzeH.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kWzeH.jpg" alt="Output"></a></p>