// in idiomatic Java you would say: out.println( "x:" + x + " y:" + y ); // instead of C-style out.printf( "x: %d y: %d", x, y );