zoukankan      html  css  js  c++  java
  • 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
    局部变量和形参发生冲突
    

      

  • 相关阅读:
    setup命令开机启动服务配置
    setup命令网卡配置
    ARM架构与ARM内核
    菁华开示目录
    末法时代选修净土法门可得解脱
    净宗之声 | 向知识分子介绍净土法门(文声对照)
    1217. 无量寿经颂序
    150.2 重刻安士全书序二
    往生典范|黄忠昌往生记实+西方发愿文+止语的好处等
    深度揭秘|邪淫、艳遇背后的真相(影音+图文)
  • 原文地址:https://www.cnblogs.com/xuesu/p/4192346.html
Copyright © 2011-2022 走看看