ERROR - Syntax error on token "(", invalid Expression


Problem

Syntax error on token , invalid Expression with Collection classes using Java version < 1.5.

Cause 

Problem is due to the outdated JDK version.

Resolution

Change your JDK level to >= 5.0

Go to Windows -> Preferences -> Compliance and Class Files -> Compiler compliance level

Change the compiler compliance level to 1.5 or above.