下面的方法有什么问题?( )
public static int getSize() {
int temp = super.getSize();
if(temp == 0)
temp = this.size;
return temp;
}此方法没有问题。
静态方法不能返回int类型
静态方法不能引用this
静态方法不能引用super
this和super都是指代类实例,而static方法本身位于类中,一对多的情况下,是无法访问对象的,故this和super都不能使用