I have this code: ArrayList<Integer> num_array = new Arraylist<Interger>();
WHY am I getting this error: "Syntax error, parameterized types are only available if source level is 1.5 or greater"
I have this code: ArrayList<Integer> num_array = new Arraylist<Interger>();
WHY am I getting this error: "Syntax error, parameterized types are only available if source level is 1.5 or greater"
In your eclipse, go to the menu under Window -> Preferences -> Java -> Compiler
. That will allow you to change the java version with the "Compiler compliance level" setting, since it appears to be set to 1.4
or lower.
EDIT: Also, if that does not work, right click on the project in the Project Explorer to the left of the screen, choose Properties and select Java Compiler
. Apply the same changes here as well.