Saturday 6 August 2016

ClassLoader in java

For the past few weeks, many questions related to ClassLoader were popping in my mind.Lets discuss these questions that I will try answer in this blog.

  • When do you need a custom classloader ?
  • If classes are loaded by classloaders , then who is responsible for loading classes of ClassLoader itself ?
  • Can a single class be loaded with different classLoaders?
  • Can Objects of same class loaded by different classloaders be compared?
  • How loadClass(String) method in ClassLoader works ?
Lets try to answer these and many other questions.