JAVA中函数调用只有值传递
为什么说JAVA只有值传递呢?如下代码
public class TestSwap {
public static void main(String... args){
Student1 s1 = new Student1(20,"小周");
Student1 s2 = new Student1(13,"瑞瑞");
TestSwap swap = new TestSwap();
swap.swap(s1,s2);
// s
原创
2020-10-24 15:26:53 ·
99 阅读 ·
0 评论