Given:
2. class Shape { } 3. class Square extends Shape { } 4. class Rectangle extends Shape { } 5. public class Main<A extends Shape> { 6. public <C extends Rectangle> Main<? super Square> useMe(A a, C c) { 7. //Insert Code Here 8. } }
Which, inserted independently at line 7, compile? (Choose all that apply.)
A, B, and C are correct.
B and C are correct because the return type of the method is Main<? super Square>, which means a Main object with a generic type that is either a Square or a super type of Square.
A is correct because null is acceptable despite the reference type.
D, E, and F are incorrect because you must specify an exact generic class type when instantiating a generic class.