Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // TODO: fix imports
- public class EfficientSwap {
- /**
- * This method should print its parameters in opposite order.
- * E.g. swap(3, 4) should print 4 then 3.
- */
- public static void swap(int a, int b) {
- a = a * b;
- b = a / b;
- a = a / b;
- // NO MORE CODE BEYOND THIS POINT
- System.out.println(a);
- System.out.println(b);
- }
- }
Add Comment
Please, Sign In to add comment