Which of the following values can be passed to a method that has an int parameter variable?下列哪个值可以传递给有int参数变量的方法?
A. float
B. double
C. long
D. All of the above 以上都是
E. None of the above 以上都不是
查看答案
The header of a value-returning method must specify this. 返回值方法的标题必须指定
A. The method's local variable names 方法的局部变量名
B. The name of the variable in the calling program that will receive the returned value 将接收返回值的调用程序中变量的名称
C. The data type of the return value 返回值的数据类型
D. All of the above 以上都是
}
A. 18.0
B. 18 (as an integer)
C. 8
D. This is an error
In a @return tag statement the description 在@return标记语句中描述
A. cannot be longer than one line 不能超过一行
B. describes the return value 描述返回值
C. must be longer than one line 必须超过一行
D. describes the parameter values 描述参数值
When a method tests an argument and returns a true or false value, it should return 当一个方法测试一个参数并返回一个真值或假值时,它应该返回
A. a zero for true and a one for false 真,1为假
B. a boolean value 布尔值
C. a zero for false and a non-zero for true 0为假,非0为真
D. a method should not be used for this type test 方法不应该用于这种类型测试