Java中(静态)变量、(静态)代码块的执行顺序_java中静态代码块先执行还是静态成员变量先执行-CSDN博客

网站介绍:文章浏览阅读355次。首先创建3个类:1、Foo类,用于打印变量public class Foo { public Foo(String word) { System.out.println(word); }}2、Parent类public class Parent { static Foo FOO = new Foo("Parent's_java中静态代码块先执行还是静态成员变量先执行