import cs1.Keyboard;
public class charAT {
public static void main(String[] args) {
String s;
//The telephone number should be 79575757
System.out.println("Enter your telephone number");
s = Keyboard.readString();
int index1 = s.charAt(0);
この部分は機能しません:
if((char)index1 == 7){
System.out.println("The second number is "+(char)index1);
}
else {
System.out.println("This number is invalid");
}
}
}
私は何を間違っていますか?