你可以把case 4 改成 case '4' 这种形式
char 类型可以自动转换为 int,将 char c = tel.charAt(10) 改为 int c = tel.charAt(10) 就可以了。
char c = tel.charAt(10)
int c = tel.charAt(10)
sc.nextline();
switch的参数类型和 case的类型要保持一致