src/main/java/org/jboss/util/Strings.java
/**
    * 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.
    *
    * @param s String to check
    *
    * @return <code>true</code> if the given String is a valid Java
    *         identifier, <code>false</code> otherwise.
    */
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.

@param s String to check

@return true if the given String is a valid Java
identifier, false otherwise.
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 . @param s String to check @return true if the given String is a valid Java identifier false otherwise .
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;
   }
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 ; }
Check whether the given String is a valid identifier according
 to the Java Language specifications.
Check whether the given String is a valid identifier according to the Java Language specifications .
// an empty or null string cannot be a valid identifier