For some reason, Greenfoot can't find the Constructor<T> class.
It's in the docs, I've tried importing the class, it just doesn't work. The code also doesn't work for other reasons, but if I can figure this out then it'll work
public <T extends Entity> void spawnEntities(Class<? extends Entity> entityType){ Constructor<T> constructor = entityType.getConstructor(Integer.class, Integer.class); constructor.newInstance(0, 0); }