私はこのコードを持っています
if(!(lotNo.charAt(0) >= "0" && (lotNo.charAt(0) <= "7"))) {
// if the first character is not within these boundaries
return false;
}
return true;
bad operator type
この方法では、「 ? 」というエラーが表示されます。String の最初の文字が 0 から 7 の間であるかどうかを確認することになっていましたが、私は正しい行にいますか?