20 lines
320 B
Text
20 lines
320 B
Text
|
/* 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)
|
||
|
|
||
|
}
|
||
|
}
|