title: Java Conventions: use getters/setters WITHIN the class?
body: <p>My professor really emphasizes protecting against privacy leaks by always using accessors and mutators to access private instance variables; however, do I have to use the getters/setters of a class within the class?</p>
  
  <p>So for instance, if I have the following class:</p>
  
  <pre><code>public class Person 
  {
      private String name;
      private int age;
  }
  </code></pre>
  
  <p>and I want to write a toString() method for it. Can I just write:</p>
  
  <pre><code>public String toString()
  {
      return name + " " + age;
  }
  </code></pre>
  
  <p>OR do I need to do something like this:</p>
  
  <pre><code>public String toString()
  {
      return this.getName() + " " + this.getAge();
  }
  </code></pre>