- 阅读权限
- 255
- 威望
- 1 级
- 论坛币
- 49635 个
- 通用积分
- 55.7537
- 学术水平
- 370 点
- 热心指数
- 273 点
- 信用等级
- 335 点
- 经验
- 57805 点
- 帖子
- 4005
- 精华
- 21
- 在线时间
- 582 小时
- 注册时间
- 2005-5-8
- 最后登录
- 2023-11-26
|
11楼
ReneeBK(未真实交易用户)
发表于 2016-9-3 09:08:02
|
- /**
- * MyClassArgument
- * Copyright 2006 by Jeff Heaton(jeff@jeffheaton.com)
- *
- * Example program from Chapter 6
- * Java for the Beginning Programmer
- * http://www.heatonresearch.com/articles/series/15/
- *
- * This class shows how to pass an argument to a method.
- *
- * This software is copyrighted. You may use it in programs
- * of your own, without restriction, but you may not
- * publish the source code without the author's permission.
- * For more information on distributing this code, please
- * visit:
- * http://www.heatonresearch.com/hr_legal.php
- *
- * @author Jeff Heaton
- * @version 1.1
- */
- public class MyClassArgument
- {
- public static void myMethod(int i)
- {
- i++;
- }
- public static void main(String args[])
- {
- int i = 10;
- myMethod(i);
- System.out.println("The value of i is " + i );
- }
- }
复制代码
|
|