标签:java
` //Java语言在调用函数时,永远只能传值给函数“
package 数组;
import java.util.Scanner;
public class ssssss {
public static void swap(int a, int b){
int t;
t = a;
a = b;
b = t;
System.out.println(“转换后a=”+a+”;b=”+b);
}
public static void main(String[] args) {
int a = 5;
int b = 6;
swap(a,b);
System.out.println(“a=”+a+”;b=”+b+”;”);
}
}
“`
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:java
原文地址:http://blog.csdn.net/wu2304211/article/details/47302071