zoukankan
html css js c++ java
成员变量和局部变量区别
声明位置不同
成员变量:在类中声明
局部变量:在方法中声明,其中形参也属于局部变量
初始值不同
成员变量:在没有赋值时,是有默认值的,数据类型不同,则默认值不同
局部变量:没有默认值,也就是说必须先声明,然后再赋值,最后才可以使用
在同一个类中,成员变量的名字可以与局部变量的名字同名,但是局部变量名字优先,也就是就近优先,如果非要访问成员变量则必须添加this.
查看全文
相关阅读:
第三个Sprint冲刺第三天
回答第1-17章
阅读第13-17章
阅读第10、11、12章
阅读第8,9,10章
作业5.2 5.3
四则运算 测试与封装 5.1
阅读第5-7章
阅读1-5章
我给队友做的汉堡包
原文地址:https://www.cnblogs.com/huochemeiyouhuo/p/12157747.html
最新文章
软件工程时间进度表
软件工程回顾与总结
操作系统实验4
职业道德素养
《构建之法》8,9,10章读后感和总结
操作系统实验三进程调度
团队以及读后感想
团队合作2.0
操作系统实验二 作业调度
作品评价
热门文章
结队2.0
SpringBoot-简单实例
html之间传递参数
Jquery获取和修改img的src值的方法
[Intellij IDEA]_eclipse项目导入
基于Spring3 MVC实现基于form表单文件上传
推广App篇
第三个Sprint冲刺总结
第三个Sprint冲刺第八天
第三个Sprint冲刺第六天
Copyright © 2011-2022 走看看