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!

convert ArrayList<Integer> to int[]

807603Dec 5 2007 — edited Dec 6 2007
Hi, i am working with ArrayList<Integer> and my method must return int[].
one step is to make Integer[] like:
int[] foo()
{
    ArrayList<Integer> list = new ArrayList<Integer>();
    ...
    Integer[] arr = new Integer[list.size()]
}
but how to return int[] ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 3 2008
Added on Dec 5 2007
3 comments
232 views