Back
I have an apex function which has a void return type. I want to exit the function at a specific position. Is this possible in apex without changing return type pagereference?
In Apex, the return keyword is used to immediately stop processing statements in the respective statement.
public void doNothing() { return;}
public void doNothing() {
return;
}
1.2k questions
2.7k answers
501 comments
693 users