Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 333 Bytes

File metadata and controls

22 lines (18 loc) · 333 Bytes

Double

The type to use for a double that might be null is Double.

~void main() {
Double d = null;
IO.println(d);
d = 3.14;
IO.println(d);
~}

If you try to do any math on a Double which holds null you will get a NullPointerException.

~void main() {
Double d = null;
IO.println(d + 1);
~}