Multiple instances of static variables

前端 未结 4 1304
自闭症患者
自闭症患者 2021-02-13 14:42

I\'m experimenting with using different classloaders to load a particular class, and see if the static variables in that class can have different instances.

Basically,

4条回答
  •  花落未央
    2021-02-13 15:38

    If you look at the ClassLoader source or even javadocs you'll find out that by default the ClassLoader delegates to the default system ClassLoader, which in fact is shared among the instances.

提交回复
热议问题