Suppose 'sample' is the class name,then the syntax is as follows
sample object2= (sample) Class.forName("abc.com.xyz.sample").newInstance(
What is the difference between class and object in java?
How object can be created using new keyword in java?
In how many ways object can be created in java?
Which class implements System Class Loader in java?
Which class implements Extensions class loader?