Aug 25, 2021
Swap two numbers in java without temp
int x=10,y=5;
x = x + y;
y = x - y;
x = x - y;
System.out.println("x value is "+x+" Y value is "+y);
Swap two numbers in java without temp
int x=10,y=5;
x = x + y;
y = x - y;
x = x - y;
System.out.println("x value is "+x+" Y value is "+y);
Knowledge is everything.Check out my app at https://play.google.com/store/apps/details?id=com.tutorspot.com