Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Certifications Interviews:AFMCAIIMS ExamCCDA CertificationCCIE CertificationCCIP CertificationCCSP CertificationCertificationsCheck Point CertificationCISCO CertificationCIW CertificationEngineering Entrance ExamsEntrance ExamsGATE ExamIBM CertificationICET ExamIIT JEEISTQB CertificationManagement Entrance ExamsMATMCDBA CertificationMCSD.NET - 70-089MCSD.NET - 70-300MCSD.NET - 70-306 ExamMCSD.NET - 70-310 ExamMCSD.NET - 70-315 ExamMCSD.NET - 70-316 ExamMCSD.NET - 70-320 ExamMCSD.NET - 70-330 ExamMCSD.NET - 70-340 ExamMCTS .Net CertificationMedical Science Entrance ExamsMicrosoft CertificationMSCE 2003 CertificationNovell CertificationNovell CLE 9 CertificationNovell CLP CertificationNovell CNA CertificationNovell CNE CertificationNovell MCNE CertificationOCP 9i DBA CertificationOPENMAT ExamOracle Application DeveloperOracle CertificationPMI CertificationPost Graduation Entrance ExamsRed Hat CertificationS/W Quality AssuranceSun CertificationSybase CertificationTesting Certification
Copyright © 2018. All Rights Reserved
Sun Certification Interview Question:
Explain Given:
21. 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. Canada
B. null Canada
C. Canada null
D. Canada Canada
E. Compilation fails due to an error on line 26.
F. Compilation fails due to an error on line 29.
Submitted by: AdministratorE:Compilation fails due to an error on line 26.
Submitted by: Administrator
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.