class Text2
{
public static void main(String[] args)
{
//对两个整数变量的值进行互换(不需要第三方变量)
int a =3,b=4;
System.out.println("a="+a+"b="+b);
a = a^b;
b = a^b;
a = a^b;
System.out.println("a="+a+"b="+b);
}
}
{
public static void main(String[] args)
{
//对两个整数变量的值进行互换(不需要第三方变量)
int a =3,b=4;
System.out.println("a="+a+"b="+b);
a = a^b;
b = a^b;
a = a^b;
System.out.println("a="+a+"b="+b);
}
}