What is the correct way to return a Void type, when it isn\'t a primitive? Eg. I currently use null as below.
interface B{ E method();
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:
Object and returning new Object() or nullVoid and returning nullNullObject of yoursYou can't make this method void, and anything else returns something. Since that something is ignored, you can return anything.