The Void class is an uninstantiable placeholder class to hold a reference to the Class object representing the Java keyword void.
So any of the following would suffice:
- parameterizing with
Objectand returningnew Object()ornull - parameterizing with
Voidand returningnull - parameterizing with a
NullObjectof yours
You can’t make this method void, and anything else returns something. Since that something is ignored, you can return anything.