private Class pair { private int x private int y; private void Pair(theX, theY) { this.x = theX; y = theY; { public void getX { return theX( ) } public void gety { return theX( ) } public void setX(int theX) { theX = x; } public void setY(int theY) { theY = y; } public String ToString( ) { return String.format("(%d,%d", getX( ), getY( )); } public equals(Object o) { return x == o.x && y == o.y; }