class Money { 22. private String country = "Canada"; 23. public String getC() { return country; } 24. } 25. class Yen extends Money { 26. public String getC() { returnsuper.country; } 27. } 28. public class Euro extends Money { 29. public String getC(int x) { returnsuper.getC(); } 30. public static void main(String[] args) { 31. System.out.print(new Yen().getC() + " " + new Euro().getC()); 32. } 33. } 结果是26行有错,为什么啊?26行不是覆写23行内容吗?
|