Get class by name java

String className = "TestClass";
Class<?> class = Class.forName(className);
 
//Create instance of the specified class
Object classInstance = class.newInstance();
Content Protection by DMCA.com
Please Share