public class lqh { public static void main(String[] args) { // TODO Auto-generated method stub int a=10; int b=20; int tmp; //进行数据交换 tmp=a; a=b; b=tmp; System.out.println("交换后的a:"+a+",b:"+b); } }