java 最简单的for循环输出helloworld
1、打开电脑上的eclipse软件,配置好jdk的。

2、然后new一个Javaproject,

3、新建一个class文件,勾引main选项,自动调用main方法

4、输入代码
/*System.out.println("helloworld");
System.out.println("helloworld");
System.out.println("helloworld");
System.out.println("helloworld");
System.out.println("helloworld");
System.out.println("helloworld");
System.out.println("helloworld");
System.out.println("helloworld");
System.out.println("helloworld");
System.out.println("helloworld");*/
for (int i = 1;i <= 10 ;i++ ) {
System.out.println("helloworld");
}
}
}

5、控制台会出现
helloworld
helloworld
helloworld
helloworld
helloworld
helloworld
helloworld
helloworld
helloworld
helloworld

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:81
阅读量:41
阅读量:42
阅读量:29
阅读量:21