当前位置: 代码迷 >> J2SE >> 一个面试选择题 大家帮忙看上
  详细解决方案

一个面试选择题 大家帮忙看上

热度:148   发布时间:2016-04-24 00:20:31.0
一个面试选择题 大家帮忙看下
public interface Foo{
  int k=4;
}
which three are equivalent to line 2(int k=4)??
A final int k=4;
B public int k=4;
C static int k=4;
D private int k=4
E abstarct int k=4;
F volatile int k=4;

我觉得接口默认不都是public static final 类型吗 这怎么选?
答案尽然是BDE 不懂了?

------解决方案--------------------
探讨
public interface Foo{
int k=4;
}
which three are equivalent to line 2(int k=4)??
A final int k=4;
B public int k=4;
C static int k=4;
D private int k=4
E abstarct int k=4;
F volatile int ……
  相关解决方案