Skip to Main Content

New to Java

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!

How to specify the type of an ArrayList

807597Oct 11 2005 — edited Oct 11 2005
Hi!

I want to collect a series of int's in an ArrayList. But it seems to be something wrong with:

ArrayList<int> myArrayList = new ArrayList<int>();

So, how do I write if I only want to put in numbers (int's) into my ArrayList?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 8 2005
Added on Oct 11 2005
1 comment
71 views