Compilation fails when using JDK1.5 due to
1) no specification of language level
2) use of "enum" as identifier
The language issue results in the use of the new StringBuilder class for string concatenation resulting in code that will not run on earlier JVMs.
Dropping the langauge level will allow it to compile but warnings are generated due to the use of "enum" as an identifier; with 1.5 this becomes a reserved word