Q:

How to stop a method before end

I want to know how can i stop reading code in a method because i've a method with multiple if() and if the first one is completed the second one now become readable too, etc :
 public void putPlayerInLadderBord() {

    if(player1Score < 0) {
        player1Score = currentPlayerScore;
        player1Name = currentPlayerName;
        player1.setText(player1Name + " - Score : " + player1Score);
    }
    if (player1Score >= 0 && player2Score < 0) {
        player2Score = currentPlayerScore;
        player2Name = currentPlayerName;
        player2.setText(player2Name + " - Score : " + player2Score);
    }
    if (player1Score >= 0 && player2Score >= 0 && player3Score < 0) {
        player3Score = currentPlayerScore;
        player3Name = currentPlayerName;
        player3.setText(player3Name + " - Score : " + player3Score);
    }
    if (player1Score >= 0 && player2Score >= 0 && player3Score >= 0 && player4Score < 0) {
        player4Score = currentPlayerScore;
        player4Name = currentPlayerName;
        player4.setText(player4Name + " - Score : " + player4Score);
    }
    if (player1Score >= 0 && player2Score >= 0 && player3Score >= 0 && player4Score >= 0 && player5Score < 0) {
        player5Score = currentPlayerScore;
        player5Name = currentPlayerName;
        player5.setText(player5Name + " - Score : " + player5Score);
    }
}

Result, when a player finish the game, his score+name is put in every case of LadderBord ^^
I want to add something like stop() after each if but i don't know if it's possible/ what syntax can i use !
Thanks

A:

There is no loop in your question, but you are asking about control flow.  I think you want the if-then-else statement.  Or you could use the return statement.  In general, the Java Tutorials are a great resource for learning this kind of thing.

