Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**
     * Interrupt the specified thread. Returns true if it was able to
     * interrupt the specified thread or false if the specified thread
     * is the current thread and thus interrupt was not called.
     */
    public static boolean interrupt(Thread thread) {
        if (thread != Thread.currentThread()) {
            thread.interrupt();
            return true;
        }
        return false;
    }
}