Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {

    public static void main(String[] args) {
        new Thread(uncheck(() -> {
            Thread.sleep(1000L);
            System.out.println("done");
        })).start();
    }

    private static Runnable uncheck(RunnableEx ex) {
        return () -> {
            try {
                ex.accept();
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        };
    }

}

@FunctionalInterface
interface RunnableEx {
    public abstract void accept() throws InterruptedException;
}