how to interrupt a void java

Java
public void someMethod() {
    //... a bunch of code ...
    if (someCondition()) {
        return; //This exits the method
    }
    //... otherwise do the following...
}
Source

Also in Java: