title: Building a copy constructor in Java
body: <p>How do I build a copy constructor that receive another point (x,y) and copy its values ?</p>
  
  <p>I decide a signature: <code>public Point1 (Point1 other)</code> , but I don't know what to write in it...</p>
  
  <p>The Point class looks like:</p>
  
  <pre><code>public class Point1
  
  {
      private int _x ,  _y;    
      public Point1 (Point1 other)
      {
          ...
          ...
      }
  //other more constructors here...
  
  }
  </code></pre>
  
  <p><strong>I tried:</strong></p>
  
  <pre><code>public Point1 (Point1 other)
  {
      _x = other._x ;
      _y = other._y;
  }
  </code></pre>
  
  <p>But I almost sure I can do it better..</p>
  
  <p>thnx</p>