Bootstrap

Thread.currentThread().isInterrupted()

import java.io.*;
public class CopyDog
{ // Not to be confused with copycat
 public static void main(String[] args)
 {
  Thread.currentThread().interrupt();
  if(Thread.interrupted())
  {
   System.out.println("Interrupted: " +
   Thread.interrupted());
  }
  else
  {
   System.out.println("Not interrupted: " +
   Thread.interrupted());
  }
  Thread.currentThread().interrupt();
  if(Thread.currentThread().isInterrupted())
  {
   System.out.println("Interrupted: " +Thread.currentThread().isInterrupted());
  }
  else
  {
   System.out.println("Not interrupted: " +Thread.currentThread().isInterrupted());
     }
  }
 }

 

 

;