java - 请教一下final修饰的局部变量存放在哪
高洛峰
高洛峰 2017-04-18 10:47:46
0
1
1117

是在方法区的常量池吗?还是在堆内存中呢?
如果在常量池那么使用final会有可能导致常量池溢出吗?
如果在堆内存中又是如何保证内部类在使用时这个变量还存活呢?

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(1)
迷茫

The storage area has nothing to do with whether it is final or not, but depends on the type

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!