Thread interrupt reset : Thread Attributes « Threads « Java






Thread interrupt reset

Thread interrupt reset
 
public class InterruptReset extends Object {
  public static void main(String[] args) {
    System.out.println("Thread.interrupted()="
        + Thread.interrupted());
    Thread.currentThread().interrupt();
    System.out.println("Thread.interrupted()="
        + Thread.interrupted());
    System.out.println("Thread.interrupted()="
        + Thread.interrupted());
  }
}

           
         
  








Related examples in the same category

1.Thread nameThread name
2.Get Thread nameGet Thread name
3.Thread PriorityThread Priority
4.Set Thread PrioritySet Thread Priority
5.Thread Interrupt when calculating PiThread Interrupt when calculating Pi
6.Thread pending and interruptThread pending and interrupt
7.Thread interrupt checkThread interrupt check
8.Thread priority informationThread priority information
9.Thread general interruptThread general interrupt
10.Thread IDThread ID
11.ThreadGroup EnumerateThreadGroup Enumerate
12.Utilities to manage thread ids