在没有涉及反射的情况下,下列情况引起类被加载:
·The invocation of a constructor on a new instance of the class
·The creation of an array that has the class as its an element type
·The invocation of a method declared by the class (not inherited from a superclass)
·The use or assignment of a field declared by the class (not inherited from a superclass or
superinterface), except for fields that are both static and final, and are initialized by a
compile-time constant expression
[Java] Note
最新推荐文章于 2024-09-16 21:37:07 发布