3 ms·
This is completely incorrect. Java's null value is only valid as a value of an object type (e.g, Object x = null), and void functions don't return an object.
by duskwuff 10y ago
This is completely incorrect. Java's null value is only valid as a value of an object type (e.g, Object x = null), and void functions don't return an object.
- tokenizerrr 10y agoThe compiler doesn't allow it, but if you call the function with for example reflection you get null.