title: Java: How to pass Point values to a Polyline?
body: <p>So I have this <code>Polyline</code> class that uses another class (<code>Point</code>) to create a polyline. </p>
  
  <p>The class <code>Point</code> just defines a point with a x and y value and a name to it (Point A, Point B, etc)</p>
  
  <pre><code>public class Polyline 
  
  {
  private Point []    corner;
  
  public Polyline ()
  {
      this.corner = new Point[0];
  
  }
  
  public Polyline (Point [] corner)
  {
      this.corner = new Point [cornerlength];
      for (int i = 0; i &lt; corner.length; i++)
          this.corner[i] = new Point (corner[i]);
  
  }
  </code></pre>
  
  <p>Now my question is, how do I give these corners their values? I made a programme called <code>PolylineTest</code> and I would like to give it some values and print it out, but I haven't managed to figure out how to do it. </p>
  
  <p>I figured it would be something like this: </p>
  
  <pre><code>Polyline [] p1 = new Polyline[0];
  </code></pre>
  
  <p>but I can't figure out how to give it a value.</p>
  
  <p>Could anyone give me a nudge to the right direction?</p>
  
  <p>Thank you in advance </p>
  
  <p>(the code currently does not compile)</p>