13 lines
213 B
Text
13 lines
213 B
Text
|
/* Test accessing arrays with invalid index*/
|
||
|
class Main {
|
||
|
void main() {
|
||
|
int[] x;
|
||
|
x = new int[5];
|
||
|
x[0] = 3;
|
||
|
x[1] = 4;
|
||
|
x[2] = 5;
|
||
|
|
||
|
x[5] = 5; //this should fail
|
||
|
}
|
||
|
}
|