首页 > 其他 > 详细

static local variable

时间:2015-08-17 11:55:29      阅读:274      评论:0      收藏:0      [点我收藏+]

Putting the keyword static in front of a local variable declaration creates a special

type of variable, a so-called static local variable. This variable keeps its value even

after the method ends. The next time you call this method, the variable isn’t

created anew but the existing one is used. You still can’t use the variable outside of

the method (it remains local) but it will stay alive once it has been created.

static local variable

原文:http://www.cnblogs.com/dagon/p/4736090.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!