Use arbitrary number of arguments in class generics - Java -
i wondering if possible use arbitrary number of arguments in class generics? in methods, possible using '...' why i'm wondering if there similar way done in class generics
class<t ...>
something 1 above.
no, can't that. each type-parameter must separately specified , have unique in terms of naming.
for example:
public class someclass<a, b, c, d> { .... } //valid public class someclass<a, a, b, b> { .... } //wrong, because names not unique
Comments
Post a Comment