码迷,mamicode.com
首页 > 其他好文 > 详细

static local variable

时间:2015-08-17 11:55:48      阅读:139      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!