public final static boolean isJavaKeyword ( String s ) { if ( s == null || s . length ( ) == 0 ) { return false ; } for ( int i = 0 ; i < keywords . length ; i ++ ) { if ( keywords [ i ] . equals ( s ) ) { return true ; } } return false ; }
Check whether the given String is a reserved Java Keyword according to the Java Language Specifications .