I've a read only method that should be able to take either
1. Map<Date, List<X>>
or
2. Map<Date, List<Y>>
as a parameter.
Here, I've the following two options to define the method.
A. private <T> List<Date> myMethod(Map<Date, List<T>> map)
B. private List<Date> myMethod(Map<Date, List<?>> map)
Both work fine for me, which one is preferable?
Thanks.