previous | start | next

Application using the Point2D class type

public class Point2DApp
{
  
  public static void main(String[] args)
  {
    Point2D[] pts = new Point2D[50];

    for(int i = 0; i < 50; i++) {
      pts[i] = new Point2D(Math.random(), Math.random());
      pts[i].draw();
    }
  }
}


previous | start | next