对象代表二维点的点类
/**N o w J a v a . c o m**/ class Point { private int x; private int y; public Point(int x, int y) { this.x = x; this.y = y; } // Re-implement toString() method of the Object class public String toString() { String str = "(" + x + ", " + y + ")"; return str; } }