多选题 Given:
3. class Tire {
4. private static int x = 6;
5. public static class Wheel {
6. void go() {System.out.print("roll " + x++); }
7. } }
8. public class Car {
9. public static void main(String[] args) {
10. // insert code here
11. } }
And the three code fragments:
Ⅰ. new Tire.Wheel().go();
Ⅱ. Tire t = new Tire(); t.Wheel().go();
Ⅲ. Tire.Wheel w = new Tire.Wheel(); w.go();
Assuming we insert a single fragment at line 10, which are true? (Choose all that apply.)
【正确答案】 A、C、E
【答案解析】