!sdesf を郵便番号として入力すると、!sdesf が東海岸にあると表示される理由を誰か説明してください。!sdesf は無効な郵便番号です。これが私のコードです
String zipCode;
Scanner input = new Scanner(System.in);
System.out.print("Enter 4-digit zip code: ");
zipCode = input.nextLine();
if (zipCode.charAt(0) <= '3')
System.out.println(zipCode + " is on the East Coast.");
if (zipCode.charAt(0) >= '4')
if (zipCode.charAt(0) <= '6')
System.out.println(zipCode + " is in the Central Plains area.");
if (zipCode.charAt(0) == '7')
System.out.println(zipCode + " is in the South.");
if (zipCode.charAt(0) >= '8')
if (zipCode.charAt(0) <= '9')
System.out.println(zipCode + " is in the West.");
else
System.out.println(zipCode + " is an invalid ZIP Code.");