title: Why create a new Object - Java Tetris Tutorial
body: <p>Im just new to Java and I found this good tutorial for creating a Java Tetris Game.</p>
  
  <p>I dont have a mentor or a tutor to help me with this - Ive been looking for one for ages :(
  so currently im self learning Java and PHP :)</p>
  
  <p>Anyways heres the website I found: <a href="http://zetcode.com/tutorials/javagamestutorial/tetris/" rel="nofollow">http://zetcode.com/tutorials/javagamestutorial/tetris/</a></p>
  
  <p>One method of the program I dont get in the <code>Shape.java</code> class:</p>
  
  <pre><code>public Shape rotateLeft() 
  {
   if (pieceShape == Tetrominoes.SquareShape)
       return this;
  
   Shape result = new Shape();
   result.pieceShape = pieceShape;
  
   for (int i = 0; i &lt; 4; ++i) {
       result.setX(i, y(i));
       result.setY(i, -x(i));
   }
   return result;
  }
  </code></pre>
  
  <p>Why do we need to create a new Object <code>Shape result = new Shape();</code> if can already get the current piece from the <code>pieceShape</code> variable?</p>