I'm trying to create a map like this
Map<String, Class<abstractClass>> map = HashMap<String, Class<abstractClass>>();
For its input, I tried
map.put("exampleString", childClass.class);
But this doesn't work, the IDE says wrong 2nd argument type.
Found: java.lang.Class<childClass>, required java.lang.Class<abstractClass>
Even though there's an inheritance relationship between them. Does anyone know how to solve this problem?
Thanks in advance!