I want to access the Class Type name in order to specify the runtime type. For example
DAO<?> i = DAO<?> DOA.class.forName(”Student”).newInstance();
What I am trying to do is I have a class called Student and at runtime I want to specify DAO. When running the code I get a ClassCastException.
Is there any way of getting the Student type instead of String so that the following can be done
DAO<?> = new DAO<Student>();
by specifying ?