0

次のコードで、内部クラスの「ホイール」に到達するにはどうすればよいですか?

public class InstantiateClass {
public static void main(String[] args) {
    Car c = new Car();
    //not sure how to get an instance of 'Wheel' here 
}

}

class Car{
public static class Wheel{

}
}
4

1 に答える 1

4
Car.Wheel w = new Car.Wheel();

トリックを行う必要があります。

于 2012-04-25T01:10:09.213 に答える