2 ms·
Bye Bye NullPointerException
- exDM69 16y agoIMO Java's worst design choice was to allow any object-typed value to be null. By making different design choices, it would have been perfectly feasible to not allow null objects in the language at all, but rather make some sort of nullable/maybe/optional type there is in many other languages. After all, a program that crashes with a null pointer exception is not much better than one that crashes with a segfault.