write a program in Java which will initialize 2 number and swap the value using third variable. parameters are package should be java.lang
Answers
Answered by
1
Java syntax you can write your own I will just give you a rough idea of how to do it.
initialize a and b
then
c=a;
a=b;
b=c;
now print both a and b.. the numbers are swaped now.
initialize a and b
then
c=a;
a=b;
b=c;
now print both a and b.. the numbers are swaped now.
rptg1:
pls can u send me the syntax also
Similar questions