1. 程式人生 > >java方法返回值的變量類型困惑

java方法返回值的變量類型困惑

tail 方法 .com color conf 類型 log content font

一、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方法返回值的變量類型困惑