Check out example codes for "java class from string". It will help you in understanding the concepts better.

Code Example 1

import java.lang.reflect.*;

Param1Type param1;
Param2Type param2;
String className = "Class1";
Class cl = Class.forName(className);
Constructor con = cl.getConstructor(Param1Type.class, Param2Type.class);
Object xyz = con.newInstance(param1, param2);

Learn ReactJs, React Native from akashmittal.com