title: An example of the use of the Point class?
body: <p>I'm trying to use <code>Point(double x, double y), getX(), getY()</code> to create a point and return it with <code>toString()</code>. I can't find an example of how to do this anywhere.</p>
  
  <pre><code>public class Point {
  
      private final double x;
      private final double y;
  
      public Point(double x, double y) {
          this.x = x;
          this.y = y;
      }
  
  
      public double getX() {
          return x;
      }
  
      public double getY() {
          return y;
      }
  
  
      @Override
      public String toString() {
          return ("(" + x + "," + y + ")"); 
      }
  }
  </code></pre>