How can you prematurely exit from a function without returning a value if it is a void function? I have a void method that needs to not execute its code if a certain condition i
Use a return statement!
return;
or
if (condition) return;
You don't need to (and can't) specify any values, if your method returns void.
void