When does Class#getClassLoader return null?

前端 未结 1 1660
你的背包
你的背包 2021-01-27 03:10

Say I have some Java code:

public class Widget {
    ...whatever
}

And some code that classloads the Widget:

Class         


        
相关标签:
1条回答
  • 2021-01-27 03:45

    According to this method javadoc:

    Returns the class loader for the class. Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader.

    0 讨论(0)
提交回复
热议问题