question: public final static boolean isValidJavaIdentifier ( String s ) { if ( s == null || s . length ( ) == 0 ) { return false ; } char [ ] c = s . toCharArray ( ) ; if ( ! Character . isJavaIdentifierStart ( c [ 0 ] ) ) { return false ; } for ( int i = 1 ; i < c . length ; i ++ ) { if ( ! Character . isJavaIdentifierPart ( c [ i ] ) ) { return false ; } } return true ; }
target:  Check whether the given String is a valid identifier according to the Java Language specifications. See The Java Language Specification Second Edition, Section 3.8 for the definition of what is a valid identifier.