Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

References to generic type List<E> should be parameterized?

807591Dec 5 2006 — edited May 14 2008
I get this warning below when working with ArrayList...it's only a warning not an error.my code is below

1)java.util.List resim_no = new ArrayList();

2)resim_no.add(SQL.sonuc.getString("Resim_No")); //this code is in a loop

3)String [] Aresim_no=(String[])resim_no.toArray(new String[resim_no.size()]);

2. and 3. codes makes that warning.And warning says;

Type safety: The method toArray(Object[]) belongs to the raw type List. References to generic
type List<E> should be parameterized

thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 11 2008
Added on Dec 5 2006
8 comments
2,959 views