Guest User

Untitled

a guest
Nov 20th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. // TODO: fix imports
  2.  
  3. public class EfficientSwap {
  4.  
  5. /**
  6. * This method should print its parameters in opposite order.
  7. * E.g. swap(3, 4) should print 4 then 3.
  8. */
  9. public static void swap(int a, int b) {
  10. a = a * b;
  11. b = a / b;
  12. a = a / b;
  13.  
  14. // NO MORE CODE BEYOND THIS POINT
  15.  
  16. System.out.println(a);
  17. System.out.println(b);
  18. }
  19. }
Add Comment
Please, Sign In to add comment