In a general sense, a method is 一般来说,方法是
A. a plan 一个计划
B. a statement inside a loop 循环中的语句
C. a comment 评论
D. a collection of statements that performs a specific task 执行特定任务的语句集合
查看答案
Breaking a program down into small manageable methods 将一个程序分解成小的可管理的方法
A. makes problems more easily solved 使问题更容易解决
B. allows for code reuse 允许代码重用
C. simplifies programs 简化了程序
D. all of the above 以上都是
This type of method performs a task and then terminates. 该类型的方法执行一项任务,然后终止。
A. value-returning 值返回方法
B. void 空方法
C. local 本地方法
D. simple 简单方法
num = Integer.parseInt(str) + 5;
A. a value-returning method 值返回方法
B. a void method 空方法
C. a local variable 局部变量
D. a complex method 复杂方法
Which of the following is not a part of the method header? 下面哪个不是方法头的一部分?
A. return type 返回类型
B. method name 方法名称
C. parentheses 括号
D. semicolon 分号