Type accepting any collection

I have collection of Set and List so how can call a function who accept any type of collection ?

Set<X> myset = ...;

List<X> mylist = ...;

myfunction(T collection){

So what would be the type of T ?


Collection. List and Set interfaces extends Collection.

Leave a Reply

Your email address will not be published. Required fields are marked *