Here is the class structure:
http://puu.sh/craJ1/4f6893a934.png
Here is the code:
public X method1() {...}
method2(new Y());
method2(method1());
method2(method3());
a) What types of objects could method1 actually return?
b) What could the parameter type of method2 be?
c) What could the return type of method3 be?
My Answers:
a) V,W,X
b) Y,V,X,W
c) Y,V,X,W
Did I get it right?