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