Biblioteca Java - Blame information for rev 28

Subversion Repositories:
Rev:
Rev Author Line No. Line
28 mihai 1 /*
2  * FirGet.java
3  */
4 package exemple.fire.sincronizare;
5  
6 /**
7  * Class created by @author Mihai HULEA at Feb 23, 2005.
8  *
9  * This class is part of the labs project.
10  *
11  */
12 public class FirGet extends Thread {
13     Punct p;
14  
15     public FirGet(Punct p){
16         this.p = p;
17     }
18  
19     public void run(){
20         int i=0;
21         int a,b;
22         while(++i<15){
23  
24            // synchronized(p){
25             a= p.getX();
26  
27             try {
28                 sleep(50);
29             } catch (InterruptedException e) {
30  
31                 e.printStackTrace();
32             }
33  
34             b = p.getY();
35            // }
36             System.out.println("Am citit: ["+a+","+b+"]");
37         }
38     }
39  
40     public static void main(String[] args) {
41     }
42 }