{filelink=4414}
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class ForInGenericsDemo {
public static void main(String[] args) {
List listMot = new ArrayList();
Set wordset = new HashSet();
System.out.println("Assigner les argument � la liste dynamique");
for(String word : args) {
System.out.print(word + " ");
listMot.add(word);
wordset.add(word);
}
System.out.println();
System.out.println("Afficher les mots de la list 'listMot' ");
for(String word : listMot) {
System.out.print(word + " ");
}
System.out.println();
System.out.println("Afficher les mots de la list 'wordset'");
for(String word : wordset) {
System.out.print(word + " ");
}
}
}