Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * Sleep thread for seconds.
     *
     * @param milisecond
     */
    public static void sleepForInSecs(Integer milisecond) {
        try {
            // do what you want to do before sleeping
            Thread.currentThread().sleep(milisecond);// sleep for 1000 ms
            // do what you want to do after sleeptig
        } catch (InterruptedException ie) {
            // If this thread was intrrupted by nother thread
            ie.printStackTrace();
        }
    }
}