首页
mac
it
登录
6mi
u
盘
搜
搜 索
it
for循环
for循环
mac
2022-06-30
23
for循环应用及局部变量作用范围
语法格式 例:
public
class
ForDemo1
{
public
static
void
main
(
String
[
]
args
)
{
// 将10以下的整数打印输出
int
i
=
1
;
//for(;;)
while
(
true
)
{
System
.
out
.
print
(
i
+
" "
)
;
if
(
i
==
10
)
break
;
i
++
;
}
}
}
转载请注明原文地址: https://mac.8miu.com/read-76943.html
最新回复
(
0
)