我必须调用它5次才能打印。如何通过循环连续调用方法?
运行:
我会调用这个例程5倍等等...
public class Method2 {
public static void main(String[] args) {
call();
}
static void call(){
System.out.println("I will call this routine 5 times");
for (int = i = 1; i<5; i++); //I don't know what I'm doing here.
}
}
我新的方法,我可以打电话,但我不知道如何把它放在一个循环。 在此先感谢!
这是一个Java循环...只看教程:https://docs.oracle.com/javase/tutorial/java/nutsandbolts/for.html 这些只是非常基础。 –