Possible Duplicate:
How to make an outer class inherited from an inner class내부 클래스에서 상속하는 방법?
알고 싶습니다. 다른 클래스 내부 클래스의 일부 클래스를 상속 할 수 있습니까?
코드 아래에서 실행하고 싶지만 오류가 발생합니다.
public class Computer {
int model;
Computer(int i) {
model = i;
}
public class HardDrive {
int size;
public HardDrive(int i) {
size = i;
}
public HardDrive() {
size = 40;
}
}
}
그리고 메인은 다음과 같습니다
no enclosing instance of type inner.inherit.Computer is in scope
새로운 질문을하기 전에 검색을 이용하십시오. 5 월 질문은 이미 SO에서 물었고 귀하는 즉시 귀하의 답을 찾을 수 있습니다. –
@brian 나는 묻기 전에 수색을했지만, 나는 그것을 찾을 수 없다. 왜 나는 이것을 찾을 수 없는지, 너의 도움을위한 황색을 모르겠다. – Am1rr3zA