title: encapsulation redundant Setter
body: <p>I have a coding that I found out recently to contain redundant code. If I leave the <code>Setter</code> out (Line18-21) for eg. <code>sumnr</code>, it still works perfectly well. So that code seems unnecessary. 
  But if I leave <code>this.sumnr = sumnr;</code> (Line11) out, and leave the Setter in place, than it does NOT work. Why can't <code>this.sumnr = sumnr</code> not be backed-up by the Setter in line18-21??</p>
  
  <p>Anyone a clue?</p>
  
  <pre class="lang-java prettyprint-override"><code>public class SortSums {
      private int sumnr;
      private int part1;
      private int part2;
      private int result;
      private int answer;
      private String sign;
  
      public SortSums(int somnr, int part1, int part2, int result, String sign)
      {
          this.sumnr = sumnr;    // LINE11  this line however, seems indispensible. 
          this.part1 = part1;    // idem
          this.part2 = part2;
          this.result = result;
          this.sign = sign;
      }
  
      public void setSumnr(int sumnr)  // LINE18 it seems that this 'void' method is redundant.
      {
          this.sumnr = sumnr;
      } // LINE21
  
      public int getSumnr()
      {
          return sumnr;
      }
  
  //etc...
  
  </code></pre>