compiler-design-eth/javali_tests/HW4_nop90/Array/ErrArrayNullPointerAccess2.javali

10 lines
163 B
Text
Raw Normal View History

2020-01-15 22:34:57 +01:00
/* Test access an array on a null pointer */
class Main {
void main() {
int[] x;
x[1] = 5; //this should throw null pointer exception
}
}