【发布时间】:2012-02-24 06:36:46
【问题描述】:
Java 编译器允许我在 Interface 中编写 Class 定义。这个有什么具体用途吗?
interface ClassInterface {
void returnSomething();
int x = 10;
class SomeClass {
private int y;
private void classDoingSomething() {
}
}
}
请解释一下。
【问题讨论】:
标签: java interface nested-class