public void foo(int x) { // do something with x } public void foo(int x, int y) { // do something with x and y }