How can I swap two variables without using a third variable? Rajesh Goswami248607-May-2011Problem in making a swap program in java without using a third variable. javajava Updated on 07-May-2011
Amit Singh
07-May-2011we can swap using only two variable for example
int a=5,b=10;a=a+b; b=a-b; a=a-b;
check it.