Java
静态方法里面如果使用直接调用那么被调用也必须是静态的。
且被调用的子调用方法也必须是静态的,否则会出现
No enclosing instance of type bestLoading is accessible. Must qualify the allocation with an enclosing instance of type bestLoading (e.g. x.new A() where x is an instance of bestLoading).
解决方案:在主函数中实例化对象调用动态方法。
静态方法里面如果使用直接调用那么被调用也必须是静态的。
且被调用的子调用方法也必须是静态的,否则会出现
No enclosing instance of type bestLoading is accessible. Must qualify the allocation with an enclosing instance of type bestLoading (e.g. x.new A() where x is an instance of bestLoading).
解决方案:在主函数中实例化对象调用动态方法。