How non-static initializer block invoked? [closed]
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 years ago . public class A{ { System.out.println("hi i am IIB"); } public A(){ System.out.println("hi i am constructor"); } public static void main(String... args){ A objA=new A(); } } 回答1: iib will get execute before the constructor is called No, this is not what happens. The code written in instance