Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. public class Main
  2. {
  3.     public static void main(String[] args) throws Throwable
  4.     {
  5.         int[] array = {1, 2, 3};
  6.         Thread thread = null;
  7.  
  8.         for (int i = 0; i < array.length; i++)
  9.         {
  10.             if (i == array.length)
  11.             {
  12.                 thread = Thread.currentThread();
  13.             }
  14.         }
  15.  
  16.         thread.sleep(1000L);
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement