现有: 1. class Top { 2. static int x=l; 3. public Top (inty) { x*=3; } 4. } 5. class Middle extends Top { 6. public Middle() {x+=1; ) 7. public static void main(String [] args) { 8. Middle m = new Middle(); 9. System. out .println (x); IO. } II. } 结果为: A.1 B. 2 C.3 D.编译失败 //之前好像见过有童鞋问过,可惜还是不能明白...希望大家能再次帮忙解析..xiexie
|