Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * Method to clarify, that invoking {@code Runnable#run()} is really intented. This also prevents IDEs and other
     * tools from showing warnings.
     *
     * @param runnable
     */
    public static void runInThisThread(Runnable runnable) {
        if (runnable == null) {
            throw new NullPointerException("runnable == null");
        }
        runnable.run();
    }
}