site 3ajavaexample org

Solutions on MaxInterview for site 3ajavaexample org by the best coders in the world

showing results for - "site 3ajavaexample org"
Laura
11 Jan 2017
1package com.beginner.examples;
2
3import java.util.Date;
4
5public class DelayRun {
6
7  public static void main(String[] args) {
8
9    System.out.println("It is : " + new Date());
10    try {
11      Thread.sleep(4000); // delay few seconds
12      System.out.println("It is : " + new Date());
13    } catch (InterruptedException e) {
14        e.printStackTrace();
15    }
16  }
17}
18Copy