Given the code fragment:
You have been asked to define the ProductCode class. The definition of the ProductCode class must allow c1 instantiation to succeed and cause a compilation error on c2 instantiation.
Which definition of ProductCode meets the requirement?
A.
B.
C.
D.
B is correct tested..
@Anonymous if you say C that means any Type passed at runtime will work
but with B you are forcing everything to be of the first Type (T)
B is incorrect. String does not extend Integer. Correct is C. I have tested this.
B
B