1-1实参交换
public static void swap(int x,int y){
int temp=x;
x=y;
y=temp;
}
上述均为值参数,执行调用后,实际参数不变
public static void swap(init *x,int *y){
int temp=*x;
*x=*y;
*y=temp;
}
1-2方法签名
标签:签名 blog gpo wap stat div swa 算法 方法签名
public static void swap(int x,int y){
int temp=x;
x=y;
y=temp;
}
上述均为值参数,执行调用后,实际参数不变
public static void swap(init *x,int *y){
int temp=*x;
*x=*y;
*y=temp;
}
标签:签名 blog gpo wap stat div swa 算法 方法签名
原文地址:https://www.cnblogs.com/kekeoutlook/p/8595159.html