123456789101112131415



Question 1: Given:
class One {
public One foo() { return this; }
}
class Two extends One {
public One foo() { return this; }
}
class Three extends Two {
// insert method here
}
Which one method, inserted individually, correctly complete the Three class?

1. public void foo() {}
2. public int foo() { return 3; }
3. public Two foo() { return this; }
4. public Object foo() { return this; }