Write a Java program to Swap two numbers using third variable

By | January 18, 2017

Write a Java program to Swap two numbers using third variable

java-basic-programs

 

Java program to swap two numbers:

Swapping is the process of exchange the values of two variables with each other. For example variable num1 contains 1 and num2 contains 2 after swap their values are num1 contains 2 and num2 contains 1.

SOURCE CODE::

 

OUTPUT ::

 

 

 

Leave a Reply