上机练习1

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);

    }

}

posted @ 2020-03-19 11:41  吕清华  阅读(59)  评论(0编辑  收藏  举报