Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Prac {
- static int count = 0;
- public static void main(String[] args) throws InterruptedException {
- Thread t1 = new Thread(){
- public void run(){
- System.out.println("Greeting");
- System.out.println("count: " + ++count);
- }
- };
- t1.start();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement