Bonjour,

String are read only and immutable.
Dans le cas d'une boucle il est plus performat d'utiliser un StringBuffer qu'un String

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
 
String dateDestruction;
..
            while (rs.next() == true) {
                formatter = new SimpleDateFormat("dd-MM-yyyy");
                dateDestruction = formatter.format(rs.getDate(1));
hashmap.put(rs.getString(3), metargedetruitbean);
                dateDestruction = null;
cependant dans le code ci-dessus formatter.format retourne un String donc est utile de passer par un StringBuffer ?

Merci de votre aide