So I'm creating a method that just simply creates an object given the class, object name, and the x/y position. This isn't a greenfoot specific question, but I'm wondering how I can pass in a class as a parameter. Thanks! Here's the method below. (Doesn't work).
public void createObject(Class c, String objectName, int x, int y)
{
c objectName = new c();
getWorld().addObject(objectName, x, y);
}

