麻烦大家帮我看看不知道为什么错了

private static boolean neitherLetterOrNumber(String password) {
for(int i=0; i<password.length(); i++ ) {
char cur = password.charAt(i);
if(Character.isDigit(cur) || Character.isAlphabetic(cur)) {
continue;
}
else {
return true;
}
}
return false;
}

1 error found:
File: /Users/mac/Downloads/Assignment4/MovieRecommender.java [line: 70]
Error: /Users/mac/Downloads/Assignment4/MovieRecommender.java:70: cannot find symbol
symbol : method isAlphabetic(char)
location: class java.lang.Character

2个回答

Character.isAlphabetic -> Character.isLetter

读取路径有误了,MovieRecommender.java [line: 70]把这个文件贴出来看看

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!