Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.concurrent.Executor;

public class Main {
    /**
     * Construct a synchronous executor, which will run tasks directly on the calling thread when submitted.
     */
    public static Executor makeSynchronousExecutor() {
        return new Executor() {
            public void execute(Runnable command) {
                command.run();
            }
        };
    }
}