mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-06 17:56:55 +07:00
GitOrigin-RevId: 49249d1a34b1b29b709bdb76e367ab3c705a05ef
22 lines
348 B
Java
22 lines
348 B
Java
|
|
class Test {
|
|
static final int[] DATA = {1, 2, 3};
|
|
|
|
int test(int value) {
|
|
try {
|
|
return DATA[value];
|
|
}
|
|
catch (ArrayIndexOutOfBoundsException e) {
|
|
return -1;
|
|
}
|
|
}
|
|
|
|
void test2(int value) {
|
|
try {
|
|
DATA[value] = -1;
|
|
}
|
|
catch (ArrayIndexOutOfBoundsException e) {
|
|
System.out.println(e);
|
|
}
|
|
}
|
|
} |