Help with Arraylist.....

Hi

i want to create an arraylist for my innerclass object called Option....

public class OptionSet implements Serializable

{

ArrayList<Option> options = new ArrayList<Option>();

class Option implements Serializable

{

....

}

}

But iam getting the following error:

1.The type ArrayList is not generic; it cannot be parameterized with arguments <OptionSet.Option>

2.Syntax error,Parameterized types are only available if the source level is 5.0

Where am i going wrong?

[569 byte] By [GitaSumana] at [2007-11-27 5:19:16]
# 1
What version of Java are you using. Generics became available in 5 (1.5).
floundera at 2007-7-12 10:42:37 > top of Java-index,Java Essentials,Java Programming...
# 2
jdk 1.5 version
GitaSumana at 2007-7-12 10:42:37 > top of Java-index,Java Essentials,Java Programming...
# 3
Are you using IDE? If yes, check your Java compiler settings. Your IDE must be set to use 1.4 version for compiling.Otherwise, post the exact compiler error that you're having.
eadelarosaa at 2007-7-12 10:42:37 > top of Java-index,Java Essentials,Java Programming...
# 4
Iam using the Eclipse IDE Version 3.1.2.How to check the compiler settings?
GitaSumana at 2007-7-12 10:42:37 > top of Java-index,Java Essentials,Java Programming...
# 5
To check the overall environment java compiler settings click on:WindowPreferenceJava (the little "+")CompilerLook in the panel labeled "JDK Compliance",subheading Compiler compliance level
petes1234a at 2007-7-12 10:42:37 > top of Java-index,Java Essentials,Java Programming...
# 6

Note however that each project can override the Eclipse environment compiler settings. To look at the project settings, make sure that you have the Package Explorer window open. then:

Right click on your project, then

properties (button choice) then

Java compiler. Here you can view, enable, or disable project specific settings.

petes1234a at 2007-7-12 10:42:37 > top of Java-index,Java Essentials,Java Programming...
# 7
My IDE compliance level was set to 1.4 version.when I changed it to 5(1.5) its working.Thanks a lot.....
GitaSumana at 2007-7-12 10:42:37 > top of Java-index,Java Essentials,Java Programming...