Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Creative Commons License 

public class Main {
    /**
     * Runs a Runnable if it is not null. Avoids those annoying null checks everywhere.
     * 
     * @param callback
     *            The Runnable to run.
     */
    public static void runCallback(final Runnable callback) {
        if (callback != null) {
            callback.run();
        }
    }
}