填空题
下面是一个类的定义,试将程序补充完整。
classA {
String s;
{{U}} 【12】 {{/U}}int a=66;
A(Strings 1) {
s=s1;
}
static int geta(){
return a;
}
}
【正确答案】
1、static
【答案解析】[解析] 本题考查Java中的修饰符。static方法只能处理static成员,非static方法不能处理static成员。所以题目中的geta()方法声明是static的,所以其中的变量必须也声明为static属性。