Advertisement
uopspop

Untitled

Jan 21st, 2017
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.28 KB | None | 0 0
  1.  
  2. public class Prac {
  3.     static int count = 0;
  4.     public static void main(String[] args) throws InterruptedException {
  5.         Thread t1 = new Thread(){
  6.             public void run(){
  7.                 System.out.println("Greeting");
  8.                 System.out.println("count: " + ++count);
  9.             }
  10.         };
  11.         t1.start();
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement