void goTo(Point2D destination) { // all work and no play } void goTo(Point2D point) { // diffferent names on the argument doesn't matter }While these three functions have different signatures and can coexist inside a class.
void goTo(Point2D destination) { } void moveTo(Point2D destination) { } void goTo(double x, double y) { }Filling in the body of the third function there it might look like this:
void goTo(double x, double y) { goTo(new Point2D.Double(x, y)); }Which gives the user of the class two choices. But the programmer of the class would just have to maintain the first function.
-- PEZ