NIN*_*OOP 6 java interface nested-class
java编译器允许我在接口内编写一个Class定义.这有什么具体用途吗?
interface ClassInterface {
void returnSomething();
int x = 10;
class SomeClass {
private int y;
private void classDoingSomething() {
}
}
}
Run Code Online (Sandbox Code Playgroud)
请解释 .
| 归档时间: |
|
| 查看次数: |
3126 次 |
| 最近记录: |