Giving multiple choices that lead to different scenarios I'm doing a Java text based game as a course project.

Everything is fine but the part where it shows a conversation, then gives you 2-4 options, then each actions will lead to different text and stats changes.

For now I can only come up with declaring a string array to store all the text, looping through the text until the multiple choice is given, then declaring an int to store the choice of the player, switch the choice to give different text and stats bonuses.

This is quite inefficient and takes a lot of lines, so I wonder if there is a better way to do that.

int[] statsChanged = new int[] {0, 0, 0, 0};                   
int i;
String[] event = eventDial.getFirstNight();
for (i = 0; i &lt; 7; i++) {
    say(event[i]);
    next();
}
int choice = -1;
while (choice &gt; 2 || choice &lt; 0) {
    try {
        say(event[7]);
        choice = input.nextInt();
    } catch (InputMismatchException e) {
        next();
    }
    switch (choice) {
        case 0:
            say(event[8]); say(event[9]);
            statsChanged[0] = 2;
            break;
        case 1:
            say(event[10]); say (event[11]);
            statsChanged[1] = 2;
            break;
        case 2:
            say(event[12]);
            break;
    }
}
say(event[13]);
return statsChanged;


event is the string array that stores the text. statchanges stores all the bonuses to 4 main stats. next() is just an empty input. (input.nextLine())
say(str) is System.out.println(String str);
Style:
Avoid multiple statements in one line, as you did here: 

say(event[8]); say(event[9]);


Variable naming: 

String[] event = ...;


It would be better to name the array events or eventArray, as you are storing multiple events. 

int[] statsChanged = new int[] {0, 0, 0, 0};


statsChanged sounds like you only have true or false options, however you are assigning integer values to the elements, which have more than two options. Therefore a name such as statsLevels would be more appropriate. 

Iterating through an array. Instead of: 

int i;
for (i = 0; i &lt; 7; i++) {
    say(event[i]);
    next();
}


do

for (String e:event) {
    say(event);
    next();
}