Oracle
1Z0-851 · Question #15
1Z0-851 Question #15: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-851 to reveal the answer and full explanation for question #15. The question stem and answer options stay visible for context.
Question
Given: 09. interface Foo { int bar(); } 10. 11. public class Sprite { 12. public int fubar( Foo foo ) { return foo.bar(); } 13. public void testFoo() { 14. fubar( 15. //insert code here 15 16. ); 17. } 18. } Which code, inserted at line 15, allows the class Sprite to compile?
Options
- AFoo { public int bar() { return 1; }
- Bnew Foo { public int bar() { return 1; }
- Cnew Foo() { public int bar() { return 1; }
- Dnew class Foo { public int bar() { return 1; }
Unlock 1Z0-851 to see the answer
You've previewed enough free 1Z0-851 questions. Unlock 1Z0-851 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.