13 lines
269 B
Java
13 lines
269 B
Java
public class Hello {
|
|
public static void main(String[] args) {
|
|
while (true) {
|
|
System.out.println("Hi");
|
|
try {
|
|
Thread.sleep(1000); //1000 milliseconds is one second.
|
|
} catch(InterruptedException ex) {
|
|
Thread.currentThread().interrupt();
|
|
}
|
|
}
|
|
}
|
|
}
|