The statement that follows the android startactivity will be executed. If so, how to prevent it from being executed?

clipboard.png
if you decide that you are not logged in in the first red box, you will startactivity directly to the login page, but the following statements (the second red box) are still executed, so how to prevent it from executing

Feb.28,2021

IF ELSE, but are you sure you don't even implement the super.onCreate method?


isLogin adds the return value, and the jump operation is performed here. After receiving the return value, it is decided whether to jump or not according to the judgment result.
pseudo code:

boolean hasLogin = super.isLogin();
if(!hasLogin){
    //
    startActivity(LoginActivity);
    return;
}

//TODO:
...
Menu