Computer Science, asked by yurjun, 1 year ago

how to make java programme to swap no.s with or without using third variable

Answers

Answered by rayotikittu
1
U can swap 2 no.s without using 3rd variable like this
 class abc

public void disp(int a,int b)
{
a=a+b;
b=a-b;
a=a-b;
}
}
Similar questions