I am trying to make this program work. It checks if a string of text entered by the user is equal to one of three. Here is my code:
boolean acceptableanswer;
if(choice == choice1){
    acceptableanswer=true;
    return choice1;
}else if(choice == choice2){
    acceptableanswer=true;
    return choice2;
}else if(choice == choice3){
    acceptableanswer=true;
    return choice3;
}else{
    acceptableanswer=false;
    return null;
}
The problem is, it automatically goes to "null".
 
    