Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于静态代码块的执行时间 #12

Open
f38905c2-2c1b-4352-b86e-337d11f2db86 opened this issue Mar 12, 2020 · 1 comment
Open

Comments

@f38905c2-2c1b-4352-b86e-337d11f2db86

7、代码块和代码执行顺序.md#静态代码块 中写到:
静态代码块只在第一次new时执行一次,但实际上根据JVM规范,static执行的情况还有其他几种,例如getstatic, putstatic, 子类的clinit等

reference: https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-5.html#jvms-5.5

@h2pl
Copy link
Owner

h2pl commented Apr 19, 2020

欢迎pr哈。感谢指出。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants