Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

downloader

By: zinc55 on Feb 27th, 2013  |  syntax: Java  |  size: 0.27 KB  |  views: 51  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2. public class Downloader implements Runnable {
  3.        
  4.         volatile boolean finished = false;
  5.  
  6.         public void stopMe()
  7.         {
  8.         finished = true;
  9.         }
  10.  
  11.         public void run()
  12.         {
  13.                 while (!finished)
  14.                 {
  15.                         System.out.println("things");
  16.                 }
  17.                
  18.                 System.out.println("Done.");
  19.         }
  20. }
clone this paste RAW Paste Data