For循环
来源:互联网 发布:alien skin x2 mac 编辑:程序博客网 时间:2024/06/05 18:04
class ForDemo
{public static void main(String[] args)
{
//若变量只为控制循环次数,用for循环,内存比较优化
for(int x=0;x<3;x++) //注:该x只存在于for循环内,当循环结束x被释放,即:变量的作用域
{
System.out.println("x="+x);
}
int y=0;
while(y<3)
{
System.out.println("y="+y);
y++;
}
System.out.println("y1="+y);
}
}
0 0
- for循环
- For循环
- for循环
- for 循环
- for循环
- for循环
- for循环
- for循环
- for 循环.
- for 循环
- for循环
- For循环
- for循环
- FOR循环
- for循环
- for循环
- for循环
- for循环
- 谈谈对quick-cocos2d-x和cocos2d-x lua的区别理解
- 设计模式(百度百科)
- C语言中的链接属性
- 初始BFS ,以及二叉树层次遍历
- 【Phaser游戏列表】——Flappy-bird
- For循环
- [MFC]CString转char[]
- 程序员的编程、调试、排错小建议
- 插入排序_1.直接插入排序
- 程序员生存定律-打造属于自己的稀缺性
- 东软学习,oracle函数与触发器
- Java Thread(线程)案例详解sleep和wait的区别
- EGORefreshTableHeaderView--ARC下面的使用 UItableView下来刷新的使用
- hdu 1005 Number Sequence(智寻循环节)