compiler-design-eth/javali_tests/from_prev_HW/NULLTest.javali
Carlos Galindo 0afc86ceeb
Homework 3
2020-01-15 22:32:25 +01:00

20 lines
No EOL
320 B
Text
Executable file

/* testing null references:
assigning null to an int or a boolean results in an error
write(null) results in a parser failure
*/
class Main {
void main() {
int a;
boolean b;
Object c;
a = null;
b = null;
c = null;
write(a);
writeln();
//write(null)
}
}