title: toString() method not printing the correct values of object
body: <p>I'm following a book and I have a <code>Point</code> class which defines a point and I am trying to display the values. I've been looking around for a while now, whatever I do it always displays [0,0] here's my code.</p>
  
  <pre><code>  class Main {
  
      public static void main(String []args) {
          Point point = new Point(10, 20);
          System.out.println(point.toString());
      }      
    }
  
    class Point {
  
      private int x, y;
  
      public Point(int x, int y) {
        x = x;
        y = y;
      }
  
      public String toString() {
        return "[" + x + ", " + y + "]";
      }
  </code></pre>