U
Ulrich Scholz
Hi everybody.
In my project I create an array <code>atoms</code> in Java 5.0 that
holds elements of Type Vector<Term>. Term is some other class in my
project.
private Vector<Term>[] atoms;
In Eclipse, the assignment
atoms = new Vector[size];
gives the warning
Type safety: The expression of type Vector[] needs unchecked
conversion to conform to Vector<Term>[]
But
atoms = new Vector<Term>[size];
results in the error
Cannot create a generic array of Vector<Term>
How do I correctly initialize Vector <code> atoms</code> in Java 5.0?
Pointer to documentation welcome.
Thank you,
Uli
In my project I create an array <code>atoms</code> in Java 5.0 that
holds elements of Type Vector<Term>. Term is some other class in my
project.
private Vector<Term>[] atoms;
In Eclipse, the assignment
atoms = new Vector[size];
gives the warning
Type safety: The expression of type Vector[] needs unchecked
conversion to conform to Vector<Term>[]
But
atoms = new Vector<Term>[size];
results in the error
Cannot create a generic array of Vector<Term>
How do I correctly initialize Vector <code> atoms</code> in Java 5.0?
Pointer to documentation welcome.
Thank you,
Uli