问题:
interface foo {
int k = 0;
}
public class test implements Foo (
public static void main(String args) (
int i;
Test test = new test ();
i= test.k;
i= Test.k;
i= Foo.k;
)
)
What is the result? ()
A . Compilation succeeds.
B . An error at line 2 causes compilation to fail.
C . An error at line 9 causes compilation to fail.
D . An error at line 10 causes compilation to fail.
E . An error at line 11 causes compilation to fail.
interface foo {
int k = 0;
}
public class test implements Foo (
public static void main(String args) (
int i;
Test test = new test ();
i= test.k;
i= Test.k;
i= Foo.k;
)
)
What is the result? ()
● 参考解析
本题暂无解析
相关内容
相关标签