首页 > 代码库 > java方法返回值的变量类型困惑
java方法返回值的变量类型困惑
一、java program progress of excuting:show in next picture
How about the java virtual machine is it,what situation is in the jvm,or how to worke is going?
If you want to slove these questions,please read the next picture:
The more details please visit:http://aofengblog.blog.163.com/blog/static/631702120107142336862/
二、Why can java return local varieties?
As we known that the local varieties are stored in the stack(global varieties are in dull),and they will be destroyed when the method excuted.
then my confuse also conducted,although this local varieties have been destroyed,i understand that the varieties of method in jvm had been clear,then,why could not void method return a local variety?
就是为什么java非空method能够返回method的局部变量,而不是必须是成员变量?
java方法返回值的变量类型困惑
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。