4 ms·
You can call a method on a null value in Java and C#. It's perfectly defined behavior: throwing a NullPointerException.
by catnaroek 10y ago
You can call a method on a null value in Java and C#. It's perfectly defined behavior: throwing a NullPointerException.
- Vendan 10y agoyes, and it's a completely different behavior then Go, where it's perfectly defined as well: you call that method with a nil pointer as the receiver. Please don't act like those 2 behaviors are anywhere near similar.