KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ch > ethz > prose > jikesrvm > Point


1 package ch.ethz.prose.jikesrvm;
2
3 public class Point {
4
5   int x;
6
7   private int y;
8
9   public int getX() {
10     return x;
11   }
12
13   public int getY() {
14     return y;
15   }
16
17   public void setX(int x) {
18     this.x = x;
19   }
20
21   public void setY(int y) {
22     this.y = y;
23   }
24
25   public String JavaDoc toString() {
26     return "(" + x + ", " + y + ")";
27   }
28
29 }
30
Popular Tags