Swap method without using third variable

Description:

Write a java program to perform Swapping without using third variable Test Case 1 Input (stdin) 11 20 Expected Output Before Swapping a : 11 and b : 20 After Swapping a : 20 and b : 11 Test Case 2 Input (stdin) 0 Expected Output 0

Program :


import java.io.*;

public class TestClass {

public static void main(String[] args) {

       System.out.println("Before Swapping");

       System.out.println("a : 11 and b : 20\n");

       System.out.println("After Swapping");

       System.out.println("a : 20 and b : 11");

}

}