diff --git a/src/main/java/com/bytelegend/Swapper.java b/src/main/java/com/bytelegend/Swapper.java index 47fea87..db2121c 100644 --- a/src/main/java/com/bytelegend/Swapper.java +++ b/src/main/java/com/bytelegend/Swapper.java @@ -2,12 +2,12 @@ public class Swapper { public static void swap(Point point) { - swapin(point); + swap(point.x, point.y); } - public static void swapin(Point point) { - int temp = point.x; - point.x = point.y; - point.y = temp; + public static void swap(int x, int y) { + int temp = x; + x = y; + y = temp; } }