slides/Point.java
author Christian Urban <urbanc@in.tum.de>
Thu, 17 Nov 2016 15:12:47 +0000
changeset 59 8e866d0af03a
parent 32 45557ad18ea6
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
public class Point {
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
  private final int x, y;
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
 
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
  public Point(int x, int y) {
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
    this.x = x;
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
    this.y = y;
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
  }
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
 
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
  public int x() { return x; }
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
 
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
  public int y() { return y; }
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
}