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 回答