public class TestItListe { public static void main(String[] args) { String commande = args[0]; ItListe l = new ItListe (); for (int i = 0; i < commande.length(); i++) { char c = commande.charAt(i); switch (c) { case 'A': { i++; char cc = commande.charAt(i); System.out.println("Ajouter \"" + cc + "\""); l.ajouter(cc); break; } case 'R': { i++; char cc = commande.charAt(i); System.out.print("Rechercher \"" + cc + "\" : "); System.out.println(l.rechercher(cc)); break; } case 'D': { System.out.println("Aller au debut"); l.allerAuDebut(); break; } case 'V': { System.out.println("Avancer"); l.avancer(); break; } case 'M': { i++; char cc = commande.charAt(i); System.out.println("Modifier \"" + cc + "\" : "); l.modifier(cc); break; } default : System.out.println(c + ": commande inconnue"); break; } System.out.println(l); } } }