Explication de la cause d'une exception
Bonjour,
J'ai un petit problème
Voici le code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| for(i=1;i<=90;i++){
int higher =303;
int random = (int)lower + (int)(Math.random() * ((higher- lower) + 1));
//int random = (int)(Math.random() * (higher-lower)+lower) ;
//zero[i] =AlphabetManager.createSymbol(String.valueOf(random), Annotation.EMPTY_ANNOTATION);
zero[i] =AlphabetManager.createSymbol(String.valueOf(r.nextInt(303)), Annotation.EMPTY_ANNOTATION);
System.out.print("outing"+zero.length);
symbols.add(zero[i]);
}
for(i=1;i<=90;i++){
e1 = new Edit(org[i], 0, DNATools.createDNA("-"));
sy1.edit(e1);
} |
lorsque je lance l'exécution parfois il renvoie cette exception
Code:
1 2
| Exception in thread "main" java.lang.IndexOutOfBoundsException
at org.biojava.bio.symbol.SimpleSymbolList.edit(SimpleSymbolList.java:323) |
et parfois il continue parfaitement, j'aimerais bien savoir pourquoi des fois il affiche cette exception ?
Merci d'avance pour votre aide.