bonjours,

je suis entraint d'ecrire un code java et la conso me signa des erreurs et je veux bien m'expliquer de quoi il s'agit
Code : Séctionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 
 
import java.util.ArrayList;
 
public class Parking {
	protected String state;
	protected int nVehics;
	public String name;
	ArrayList<String > ftPark = new ArrayList<String>();
	ArrayList<String> rightPark = new ArrayList<String>();
 
	public Parking (String name){
		state = new String("free");
		nVehics=0;
		this.name=name;		
	}
 
	public synchronized void getPark(String direction){
	    whi(!(state.equals("free")|| state.equals(direction))){
	          try{     wait();   }
	          catch(InterruptedException e){
	              System.err.println(e);
	          }
	    }
		state = direction;
		if(direction.equals("ftToRight")) ftPark.add(this.name);
		else rightPark.add(this.name);
	}
 
	public synchronized void reasePark(){
		if(rightPark.size() < 3){
			state="free";
			notifyAll();
		}
	}
 
}
et s erreurs:

Code : Séctionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
 
ftPark cannot be resolved	
rightPark cannot be resolved	
rightPark cannot be resolved	
Syntax error, parameterized types are only availab if source vel is 5.0	
Syntax error, parameterized types are only availab if source vel is 5.0	
Syntax error, parameterized types are only availab if source vel is 5.0	
Syntax error, parameterized types are only availab if source vel is 5.0	
The type ArrayList is not generic; it cannot be parameterized with arguments <String>	
The type ArrayList is not generic; it cannot be parameterized with arguments <String>	
The type ArrayList is not generic; it cannot be parameterized with arguments <String>	
The type ArrayList is not generic; it cannot be parameterized with arguments <String>