码迷,mamicode.com
首页 > 其他好文 > 详细

The parameter to the method is the basic data type

时间:2018-09-23 13:38:55      阅读:123      评论:0      收藏:0      [点我收藏+]

标签:print   string   str   odi   code   asi   data   static   bsp   

 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 }

 

The parameter to the method is the basic data type

标签:print   string   str   odi   code   asi   data   static   bsp   

原文地址:https://www.cnblogs.com/lzp123456-/p/9692231.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!