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");
}
}
}
我究竟做错了什么?