java程序设计基础篇 复习笔记 第五单元


1.
method header: modifier, return value type, method signature(method name, parameter)
method body
2.
value-returning method
void method
method overloading
ambiguous invocation: max(int,double) max(double,int)
3.
formal parameter
actual parameter
parameter list
parameter order association
pass-by-value
4.
scope of variable
local scope
5.
Math数学类
	trigonometric method: sin, cos, tan, asin, acos, atan, toRadians, toDegrees
	exponent method: exp, log, log10, pow, sqrt
	service: ceil, floor, rint, round,
		min,max,abs,random
6.
divide-and-conquer: stepwise refinement
stub


Keyword:
actual parameter
argument
ambiguous invocation
divide and conquer
formal parameter: meter
information hiding
method
method abstraction
method overloading
method signature
modifier
pass-by-value
parameter
return type
return value
scope of variable
stepwise refinement
stub: 待完善方法

5.1
增强模块化和可重用性
modifier return_value_type method_name method_parameter_list
类名.方法名或者实例化对象.方法名
5.2
void
5.3
可以
5.4
不一定
5.5
java编译错误
可以,不加值
会
5.10
formal parameter: 定义在方法头中的变量
actual parameter: 调用时参数的值
method signature: 方法名+参数
5.11
0
;
2 ;
2 4 ;
2 4 8 ;
2 4 8 16 ;
2 4 8 16 32 ;
2 4 8 16 32 64 ;
Before the call, variable times is 3
Welcome to Java!
Welcome to Java!
Welcome to Java!
After the call,variable times is 3
;

1 
2 1 
2 1 
4 2 1 
i is 4
;
5.12
.......
5.13
定义不同方法体不同方法签名相同方法名的函数;可以;不行
5.14
重载发生冲突
5.15
局部变量和形参发生冲突

  

优质内容筛选与推荐>>
1、[转]ActiveX控件安全初始化之一:实现ISafeObject接口
2、Javascript面向对象编程(三):非构造函数的继承
3、CGI FastCGI WSGI 解析
4、Visual Studio 2010 Service Pack 1 离线安装包
5、2014年河南省第七届ACM大赛总结


长按二维码向我转账

受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。

    阅读
    好看
    已推荐到看一看
    你的朋友可以在“发现”-“看一看”看到你认为好看的文章。
    已取消,“好看”想法已同步删除
    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号