jvm加载类时怎样执行一段代码jvm加载类时怎样执行一段代码?是不是可以用static代码块?还有其他方法吗?[解决办法]Class class = class.forName("").newInstanse();class.method();这样也可以[解决办法]