2015-09-04 18:12:37 +00:00
|
|
|
public class Hello {
|
|
|
|
public static void main(String[] args) {
|
2017-07-23 02:04:36 +00:00
|
|
|
System.out.println("Hello");
|
|
|
|
int seconds = 5;
|
|
|
|
if (args.length != 0) {
|
|
|
|
seconds = Integer.parseInt(args[0]);
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
Thread.sleep(1000*seconds); //1000 milliseconds is one second.
|
|
|
|
} catch(InterruptedException ex) {
|
|
|
|
Thread.currentThread().interrupt();
|
|
|
|
}
|
2015-09-04 18:12:37 +00:00
|
|
|
}
|
2016-10-10 18:46:27 +00:00
|
|
|
}
|