题解思路
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sin = new Scanner(System.in);
String s = "zxcvbnmasdfghjklqwertyuiop"; // 26个小写字母
String S = "QWERTYUIOPASDFGHJKLZXCVBNM"; // 26个大写字母
while(sin.hasNext()){
String str = sin.next();
// 字符串的contains方法就是判断改字符是否存在在字符串里面
if(s.contains(str) || S.contains(str)){ // || 或
System.out.println(str + " is an alphabet.");
}else{
System.out.println(str + " is not an alphabet.");
}
}
}
}