1 package method.invocation; 2 3 public class TheParameterToTheMethodIsTheBasicDataType { 4 public static void main(String[] args) { 5 int a = 10; 6 int b = 20; 7 8 System.out.println(a+" "+b); 9 10 change(a, b); 11 12 System.out.println(a+" "+b); 13 } 14 15 public static void change(int a, int b) { 16 System.out.println(a+" "+b); 17 a = b; 18 b = a + b; 19 System.out.println(a+" "+b); 20 } 21 }
原文地址:https://www.cnblogs.com/lzp123456-/p/9692231.html
时间: 2024-10-27 06:22:32