Answers

Question and Answer:

  Home  Sun Certification

⟩ Explain Given21. class Money {22. private String country = "Canada";23. public String getC() { return country; }24. }25. class Yen extends Money {26. public String getC() { return super.country; }27. }28. public class Euro extends Money {29. public String getC(int x) { return super.getC(); }30. public static void main(String[] args) {31. System.out.print(new Yen().getC() + " " + new Euro().getC());32. }33. }What is the result?A. CanadaB. null CanadaC. Canada nullD. Canada CanadaE. Compilation fails due to an error on line 26.F. Compilation fails due to an error on line 29.

E:Compilation fails due to an error on line 26.

 162 views

More Questions for you: