title: I don't get the concept of using "this" and "that" in Java
body: <p>My problem is like in the following code, for example:</p>
  
  <pre><code>    public void removeSelfFromGrid()
      {
        if ( grid == null )
          throw new IllegalStateException(
                "This actor is not contained in a grid." );
        if ( grid.get( location ) != this )
          throw new IllegalStateException(
                "The grid contains a different actor at location "
                       + location + "." );
  
        grid.remove( location );
        grid = null;
        location = null;
      }
  </code></pre>
  
  <p>I learned it a long time ago, but I don't get the concept of <code>this</code> or <code>that</code>.</p>