/** * * @Title: test_exchange * @Description: 该方法的主要作用:交换两个数 * @param 设定文件 * @return 返回类型:void * @throws */ @Test public void test_exchange(){ int num1 = 10; int num2 = 20; int exchange = 0; System.out.println("原来的数:"+num1+" "+num2); exchange = num1; num1 = num2; num2 = exchange; System.out.println("交换之后的数:"+num1+" "+num2); }