Java Swap Numbers
Program to swap two numbers using third or temp variable. /** * This program is used to swap to numbers using temp variable. * @author W3schools360 */ public class SwapNumberExample { static void swapNumbers(int num1, int num2){ int temp = num1; num1 = num2; num2 = temp; System.out.println(“After swapping: “+ num1 + ” and … Read more