Category "unbounded-wildcard"

Unable to assign the result returned by the Method that receives a generic List and returns a List<?>

I'm trying to filter a List of objects that implements an interface. And I'm trying to create a generic method for all the classes. Something like: interface So

How to add an entry with an Integer value into Map<String, ?>

I have to place an integer value into the map below. Map<String,?> map map.put("key",2000); When I run the above code I'm getting the following error: in