sergAccount

Untitled

Jan 30th, 2021
573
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package com.mycompany.app5;
  7.  
  8. import java.util.logging.Level;
  9. import java.util.logging.Logger;
  10.  
  11. /**
  12.  *
  13.  * @author Admin
  14.  */
  15. public class MyTask implements Runnable{
  16.  
  17.     @Override
  18.     public void run() {
  19.         //
  20.         System.out.println("MyTask");
  21.         for (int i = 0; i < 10; i++) {            
  22.             System.out.println("MyTask.i=" + i);
  23.             try {
  24.                 Thread.sleep(1000);
  25.             } catch (InterruptedException ex) {                
  26.                ex.printStackTrace();
  27.                 System.out.println("exception in MyTask!");
  28.                 return;
  29.             }
  30.         }        
  31.     }    
  32. }
  33.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×