Write a program to swap two numbers without using any temporary variable

Write a program to swap two numbers without using any temporary variable.Solve the above problem
Using a.Command Line input

import javax.swing.JOptionPane;
class command{
public static void main(String [] args)
{
int x=Integer.parseInt(args[0]);
int y=Integer.parseInt(args[1]);
System.out.println("The value before swapping");
System.out.println("The value x "+x);
System.out.println("The value y "+ y);
x=x+y;
y=x-y;
x=x-y;
System.out.println("The value after swapping");
System.out.println("The value after swapping of x "+x);
System.out.println("The value after swapping of y "+y);
}
}

Using b.Console Input

import java.util.*;
class scanner{
public static void main(String [] args)
{
Scanner an=new Scanner(System.in);
Scanner bn=new Scanner(System.in);
int x=an.nextInt();
int y=an.nextInt();
System.out.println("The value before swapping");
System.out.println("The value x "+x);
System.out.println("The value y "+ y);
x=x+y;
y=x-y;
x=x-y;

System.out.println("The value after swapping");
System.out.println("The value after swapping of x "+x);
System.out.println("The value after swapping of y "+y);
}
}

Using c)Input dialog box

import javax.swing.JOptionPane;
class swap{
public static void main(String [] args)
{
int flag=1;
int x=Integer.parseInt(JOptionPane.showInputDialog("Enter the 1st number"));
int y=Integer.parseInt(JOptionPane.showInputDialog("Enter the 2nd number"));

System.out.println("The value before swapping");
System.out.println("The value x ="+x);
System.out.println("The value y ="+ y);
x=x+y;
y=x-y;
x=x-y;
System.out.println("The value after swapping");
System.out.println("The value after swapping of x= "+x);
System.out.println("The value after swapping of y ="+y);
}

}