Abstract Thoughts and Simplicity
public class SwapTwoNumbers { public static void main(String[] args) { int x = 5, y = 10; x = x ^ y ^ (y = x); System.out.println("x = " + x); System.out.println("y = " + y); } }
No comments:
Post a Comment