欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

The parameter to the method is the basic data type

程序员文章站 2022-07-04 22:18:28
The parameter to the method is the basic data type ......
 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 }