Class class = Class.forName(str);
Object obj = class.newInstance();
Constructor[] constructors = class.getDeclaredConstructors(); //得到构造方法
// Constructor constructor = class.getDeclaredConstructor(new Class[](Integer.class)); //得到参数为Integer类型的构造函数,传入的参数是 类型对象数组
//constructor.newInstance(1); // 创建一个实例
Method []methods = class.getDeclaredMethod();
Object o = method[1].invoke(obj, new Integer(2)); // 调用这个方法
Student student = (Student) o;
String name = student.getStudentName();