title: Is it bad practice to have my getter method change the stored value?
body: <p>Is it bad practice to change my getter method like version 2 in my class.</p>
  
  <p>Version 1:</p>
  
  <pre><code> public String getMyValue(){
       return this.myValue
   }
  </code></pre>
  
  <p>Version 2:</p>
  
  <pre><code> public String getMyValue(){
  
      if(this.myValue == null || this.myValue.isEmpty()){
         this.myValue = "N/A";
      }
  
      return this.myValue;
   }
  </code></pre>