package com.demo.test; public class circulate { public static void main(String[] args) { System.out.println(); f(); } public static void f() { for (int i=0 ;i<4;i++){ System.out.println("我跑!"); } } }
package com.demo.test;
public class circulate {
public static void main(String[] args) {
System.out.println();
f(9);
}
public static void f(int q) {
for (int i = 0; i < q; i++) {
System.out.println("我跑!"+i);
}
}
}
和js的for循环没啥区别的,依旧两个案例
标签:java,int,void,System,循环,static,15,public,out From: https://www.cnblogs.com/wencaiguagua/p/17171669.html