Java中特有的两个函数
Character.isJavaIdentifierStart();//判断是否符合标识符开头;
Character.isJavaIdentifierPart();//判断是否符合其他部分;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
String s;
int i;
boolean f;
while(cin.hasNextLine())
{
s = cin.nextLine();
f = Character.isJavaIdentifierStart(s.charAt(0));
if(f==true)
{
for(i=1;i<s.length()&&f==true;i++)
f = Character.isJavaIdentifierPart(s.charAt(i));
}
System.out.println(f);
}
cin.close();
}
}