Create instance using class name in Java

You can create instance using class name if Java knows about the class (the class is stored somewhere of the classpath, ie) within the application context. Thus, you can get a reference to this Class and instantiate an its object via the Class class. This technique is applied in many frameworks, web container, for example … Read more

Please share it if you found this useful
Hide Buttons