19)Which call(s) to method(addandDisp) are error free? From JavaBeat
a)only 3
b)only 1 and 3
c)only 1 and 4
d)only 1,2 and 3
e)only 1,3 and 4
Given Answer :
e
My Doubt : public static <T> void addandDisp(Collection<T> cs, T t)
Here Collection is of type T and second parameter also T. So I thought only 4 is Correct.
How can we send this :
Her els3 of type Object means in the method addandDisp() first parameter is T holds Object , How come second Orameter T holds
String???