package chenli;
import java.util.Scanner;
public class zuoye {
public static void main(String[] args) {
// TODO Auto-generated method stub
String name=null;
Scanner sca=new Scanner (System.in);
char firstChar;
do{
System.out.println("pleaseinput your name");
name=sca.nextLine();
firstChar=name.charAt(0);
}while(!(firstChar>='a' &&firstChar<='z' ||
firstChar>='A'&& firstChar<='Z'));
System.out.println("OK!your name is:"+name);
}
}
“`