Saved Bookmarks
| 1. |
Write a Java program to change the contents of two memory locations |
|
Answer» ong>Explanation: Swap two NUMBERS without using THIRD variable in java class demo { public static void main(string arg[]) { System.out.println("Before swapping"); int X = 10; int y = 20; System.out.println("value of x:" + x); System.out.println("value of y:" + y); system.out.println("After swapping"); |
|