kodejava-lang-package/src/main/java/org/kodejava/example/lang/ThreadSleepDemo.java
public void run() {
        System.out.println("Start..");
        try {
            // Wait for 10 seconds
            Thread.sleep(10000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("Finish...");
    }
// The run() method will be invoked when the thread is started.
The run() method will be invoked when the thread is started.
The run () method will be invoked when the thread is started .
public void run() {
        System.out.println("Start..");
        try {
            Thread.sleep(10000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("Finish...");
    }
public void run ( ) { System . out . println ( "Start.." ) ; try { Thread . sleep ( 10000 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } System . out . println ( "Finish..." ) ; }
The run() method will be invoked when the thread is started.
The run () method will be invoked when the thread is started .
// Wait for 10 seconds