帮我做下选择题吧

来源:百度知道 编辑:UC知道 时间:2024/09/24 08:22:26
8.Which of the following parameters do you use if you do not want the method to be able to alter a value you pass to it?
a. Value parameters
b. Output Parameters
c. Reference parameters
d. Static parameters
e. All of the above

9.Consider the code:
public double CalcPay(int hours, double rate)
{
double gross;
gross = hours * rate;
return gross;
}

In the above code:
a.the return type is incorrect
b.parameters must be separated using semi-colons (;)
c.the method has too many parameters
d.the return type is correct
e.the data type for hours is incorrect

10.A reference parameter in a method header means that:
a.the value of the parameter cannot be returned by the method
b.the method has a variable number of parameters
c.the value of the parameter can only be referred to
d.the parameter is only a placeholder for real parameter

8 a 希望方法不改变原值,只能传值参。
9 d 返回值没有问题。
10 e 引用型的参数其原值是可以在方法中改变的。
11 c S2需要类型声明
12 e 没有错误
13 d 没有权限限制的肯定是public 关键词。
14 d 构造方法用类的同名命名
15 a 应该是Button.CLick

a, d, e, c, e, d, d, d

e b e d a a c

a, d, e, c, e, d, d, a
最后一个没有明白他的意思