Newer
Older
package p4a;
import java.util.Random;
public class MainArrayListPersoGet {
public static void main(String[] args) {
Random rnd = new Random();
ArrayListPerso<Integer> arrayList = new ArrayListPerso<Integer>();
int nbOperation = Integer.parseInt(args[0]);
for (int i = 0; i < nbOperation; i++) {
arrayList.ajout(0, i);
}
for (int i = 0; i < nbOperation; i++) {
arrayList.acces(rnd.nextInt(nbOperation));
}
}
}