我通过以下 IF 语句不断收到上述错误消息。任何帮助表示赞赏。
public void sendMessage(View button) {
String mName = Name.getText().toString();
String mGuess = Guess.getText().toString();
if (mGuess != "1" || "2" || "3" || "4" || "5" || "6" || "7" || "8" || "9" || "10") {
Toast.makeText(MainActivity.this,
"The number you entered was invalid. Please try again.", Toast.LENGTH_LONG).show();
}