java stop void funtions code example
Example: how to stop a void java
public void someMethod() {
//... a bunch of code ...
if (someCondition()) {
return; //This exits the method
}
//... otherwise do the following...
}
public void someMethod() {
//... a bunch of code ...
if (someCondition()) {
return; //This exits the method
}
//... otherwise do the following...
}