> Questions on Java?

Questions on Java?

Posted at: 2014-12-18 
I just want to check if I'm on the right track.

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?