JAVA幼儿园课堂——第一课基础内容
//sout //快捷方式
System.out.println("Hello World Java");
//循环方式
int i=0;
while (i<=100)
{
System.out.println(Integer.toString(i));
i++;
}
do {
System.out.println(Integer.toString(i));
i++;
}while (i<=100);
for(i=0;i<=100;i++)
{
System.out.println(Integer.toString(i));
i++;
}
ary.fori //正序
ary.forr //倒序
String[] ary = new String[]{"1","2","3","4","6","5","9"};
for( String b : ary)
{
System.out.println(b);
}