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

JVM 类的生命周期 初始化阶段 规定的几种主动引用情况有缺失 #745

Closed
Planeswalker23 opened this issue Apr 21, 2020 · 1 comment
Labels
enhancement New feature or request or suggestion

Comments

@Planeswalker23
Copy link

Planeswalker23 commented Apr 21, 2020

还有一种是:
当一个接口中定义了JDK8新加入的默认方法(被default关键字修饰的接口方法)时,如果有这个接口的实现类发生了初始化,那该接口要在其之前被初始化。

参见《深入理解Java虚拟机(第三版)》7.2 类加载的时机

这是我的验证代码示例

@Snailclimb
Copy link
Owner

赞!刚看了书籍是这样的。感谢!

@Snailclimb Snailclimb added the enhancement New feature or request or suggestion label Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request or suggestion
Projects
None yet
Development

No branches or pull requests

2 participants