• 2021-04-14
    给出以下代码: 5.class Atom { 6. Atom() { System.out.print("atom"); } 7. } 8. class Rock extends Atom { 9. Rock(String type) {System.out.print(type); } 10. } 11. public class Mountain extends Rock { 12. Mountain() { 13. super("granite "); 14. new Rock("granite "); 15. } 16. public static void main(String[] a) { 17. new Mountain(); } 18. } 程序的执行结果是:( )
  • 举一反三