This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I don't believe that there are any magical java constructs that will tell you if a string is a java keyword. As a quick solution, create a class and method called for example - JavaUtils and isJavaKeyword (that returns a boolean) and have the method do exactly as you originally suggested (use an array - or some other type of collection). Perhaps you can load the keywords into the collection from a text file.