title: What is the meaning of local variable hides a field?
body: <p>So this is just a part of my code, and the entire program compiles and works, but I keep getting "local variable hides a field" next to lines three consecutive lines starting with "GameBoard myBoard = this.getGameBoard();. I'm just curious what that actually means and if it is doing anything to my program in the long run. </p>
  
  <pre><code>public void initialze(){
      myBoard = getGameBoard();
      obstacleLocations = myBoard.getObstaclePositions();
      pastureLocations = myBoard.getPasturePositions();
  
  GameBoard myBoard = this.getGameBoard();
      ArrayList&lt;GameLocation&gt; obstacleLocations = myBoard.getObstaclePositions();
      ArrayList&lt;GameLocation&gt; pastureLocations = myBoard.getPasturePositions();
      GameLocation closestPasture = pastureLocations.get(0);
      GameLocation closestObstacle = obstacleLocations.get(0);
  </code></pre>