Why is this function complaining that it should return a result of type char?
public static char getUserResponseToGuess(int guess){
Scanner input = new Scanner(System.in);
char userResponse = 'x';
while((userResponse != 'h' && userResponse != 'l' && userResponse != 'c')){
System.out.print("Is it" + guess + "? (h/l/c)");
userResponse = input.next().charAt(0);
if (userResponse == 'h' || userResponse == 'l' || userResponse =='c'){
return userResponse;
}
else{
System.out.print("Is it" + guess + "? (h/l/c)");
}
}
}