How to perform proper if condition

im using this function below but actually appium still perform both conditions for example if the element is displayed it will perform first part in the if() and then the part of catch ()

and if the element is not displayed it will perform only the part in catch

but actually this not what i want, i want if the element is displayed do this and end the test

and if the element is not displayed do this and end the test if(condition )
{ // do this
} else
{ // do this}
.
public void Verify_user_can_add_and_remove_song() {
TrackList.click();
PlayList.click();
SportPlayList.click();
try {
if (element.isDisplayed()) {
System.out.println(“song is displayed in the playlist”);
mishaa.click();
//performing long press (press and hold)
TouchAction action = new TouchAction(driver);
action.longPress(longPressOptions().withElement(element(element))).release().perform();
RemoveIcon.click();
Assert.assertNotEquals(element.isDisplayed(), false);
}

    } catch(NoSuchElementException e){
                System.out.println("element is not displayed in the playlist");
                AddTrack.click();
                Folders.click();
                Download.click();
                SearchIcon.click();
                SearchField.sendKeys("misha");
                element.click();
                //conditional wait until presence of an element
                new WebDriverWait(driver, 15).until(ExpectedConditions.presenceOfElementLocated(By.id("com.sec.android.app.music:id/menu_picker_search_done"))).click();
                Assert.assertEquals(elemnet.getText(), " text (Original Mix)");
            }


    }