Java SE 6 Programmer Certified Professional (1Z0-851)
© examsiri.com
Question : 1 of 10
Marks:
+1,
-0
Given :
Which, inserted independently at line 8, will compile?
1. class SuperFoo {
2.  SuperFoo doStuff(int x) {
3.    return new SuperFoo();
4.  }
5. }
6.
7. class Foo extends SuperFoo {
8.    /* insert code here*/
9. }
And four declarations:
I. Foo doStuff(int x) { return new Foo(); }
II. Foo doStuff(int x) { return new SuperFoo(); }
III. SuperFoo doStuff(int x) { return new Foo(); }
IV. SuperFoo doStuff(int y) { return new SuperFoo(); }Which, inserted independently at line 8, will compile?
Go to Question: