Печать Hello World
60 раз как таковая c.
public class Program {
public static void main(String[] args) {
try {
for (int i = 0; i < 60; i++) {
System.out.println("Hello World");
Thread.sleep(1000 / 60);
}
} catch (Exception e) {
System.out.println("Error!");
}
}
}
Этот код печатает Hello World
60 раз. Но время отсутствует.
этот код печатает Hello World
отлично. Но для печати Hello World
.
требуется более 10 се c. Как можно печатать Hello World
в 1 се c 60 раз?