Files
DEV/DEV2.1/Exception/ex1/ArrayIndexOutOfBoundsExample.java

8 lines
216 B
Java
Raw Permalink Normal View History

2024-03-18 13:54:22 +01:00
public class ArrayIndexOutOfBoundsExample {
public static void main(String[] args) {
int[] array = new int[5];
System.out.println(array[10]); // Tentative d'accès à un index inexistant
}
}