โ Back to Interfaces
Question 619
Explicit Interface Implementation
Explicit Interface Implementation
IEnglishandISpanisheach declare a method namedHello(). Because the names collide,Bilingualmust implement them EXPLICITLY: the English one returnsHelloand the Spanish one returnsHola. Do NOT write aMainmethod. Called through anIEnglishreference then anISpanishreference, the program prints: Hello Hola
Expected Output:
Hello Hola
Topics:
Interfaces
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.