Friday, January 20, 2006

Difference between Class.forName() and ClassLoader.loadClass()?

1 Comments:

Blogger Unknown said...

There is one visible difference is that, where Class.forName(String className) method is static method of java.lang.Class class, in other hand, ClassLoader.LoadClass(String className) method is instance method (non-static method). Therefore, if you want to use and call ClassLoader.LoadClass(String className) method, you need any java.lang.ClassLoader instance to load any class with this method.

Here you can see more differences with really good blog on this topic

Click Here http://www.somanyword.com/2013/12/difference-between-class-forname-and-classloader-loadclass-methods-in-java/

Monday, January 06, 2014 4:03:00 pm  

Post a Comment

<< Home