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源码系列? #2

Open
jsohpill opened this issue May 29, 2019 · 2 comments
Open

能不能讲点JVM源码系列? #2

jsohpill opened this issue May 29, 2019 · 2 comments

Comments

@jsohpill
Copy link

讲原理的都能看懂,能不能开一个讲JVM源码系列的呢,有实战内容的

@yanglbme
Copy link
Member

@jsohpill 后续考虑新增

@micwsx
Copy link

micwsx commented Apr 10, 2021

为什么局部类或者匿名类能访问局部变量。如下示例:

class Test{
public void test(){
// 为什么此局部变量必须是final修饰
final int i=0;
// 局部类分配在堆上,局部变量i在栈上分配,若方法执行结束后,局部变量内存释放,为什么局部类中访问的局部变量?
class MyClass{
public void print(){
System.out.println(i);
}
}
}
}

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

3 participants