Comprendre un warning sur ArrayList
Bonjour,
j'utilise Eclipse, et même si c'est un warning, je préfererais comprendre le problème indiqué.
Je créé une arraylist qui contiendra des Objects "MonObject" :
Code:
1 2
|
List maListe = new ArrayList<MonObject>(100); |
J'ajoute des élèments :
Code:
1 2
|
maListe.add(new MonObjet() ); |
Eclipse m'indique ceci :
"Type safety : the method add(Object) belongs to the raw type list. References to generic type list <E> should be parameterized."
J'ai pourtant rajouter <MonObject> dans la déclaration...
Merci.
Pirokkk.