Can an overridden method return void instead of an object?
It will often help to understand the Java language if you create small test classes, compile and run them. If you try to compile this test case, you will find it fails because the method signatures have return types: void and an object reference. In Java, void is a return type and void methods must not return object references. To override a method, the subclass method must have the same signature as the superclass: return type, method name and arguments. If the return type of the subclass method is different it will fail to compile, “attempting to use incompatible return type”. Actions: Follow-up, clarify or correct this answer. Submit a new question.