title: Getters/(Setters) for classes?
body: <p>A friend of mine just brought up that I should use getters for classes, is this considered good practice or not? I couldn't find the answer elsewhere. </p>
  
  <p>And how about Setters for classes? Does that even exist?</p>
  
  <p>Thanks for your input.</p>
  
  <pre><code>public class Movement {
  
          private Player p;
  
          public Movement(Player p) {
                  this.player = p;
          }
  
          // methods
  
  }
  
  
  public class Player {
  
      /**
       * The movement class that handles all players movements
       */
      private Movement movement;
  
      public Player() {
          this.movement = new Movement(this);
      }
  
      public Movement getMovement() {
          return this.movement;
      }
  }
  </code></pre>
  
  <p>@people saying duplicate question
  This is not simple variables that require protection by being private.
  This is about the habit of adding a getter for a class, which I don't get since the class is already public.</p>