return void in a void method?
问题 I know I can do this: void someMethod(){ return; } but I get a syntax error on void someMethod(){ return void; } Why is the latter not allowed? It makes more sense to me. Edit: I know what a void method is, and that I don't have to return from it at all(and probably shouldn't, in most cases) but I don't understand why I can't return void from a void method. In my opinion, there should be no keyword in the method declaration (like constructors) if the you are able to write return;. 回答1: I