Comment puis-je faire pour me passer du boolean isFind dans l'instruction While

Code : Sélectionner 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
 
 
public Map myMap = new HashMap();
 
        myMap.put(1, "RIRI");
        myMap.put(2, "FIFI");
	myMap.put(3, "LOULOU");
 
boolean isFind;
 
 
 
public void  find(String name) {
isFind = false;
 
        Iterator iter = myMap.entrySet().iterator();
 
        while (iter.hasNext() && isFind == false) {
 
            Map.Entry mEntry = (Map.Entry) iter.next();
 
          	if (name.equals(mEntry.getKey().toString())) {
             	isFind = true;   
		System.out.print((String) mEntry.getValue());
            }
        }
 
    }
Merci de votre aide