How to add element (or convert an Integer ArrayList) to an Integer Array?

Integer array = list. ToArray(new Integerlist.size()) If you want an int array, you'll have to loop over the list and unbox each element explicitly See download.oracle.com/javase/6/docs/api/ja... next time you're looking for a method of List.

Integer array = list. ToArray(new Integerlist.size()); If you want an int array, you'll have to loop over the list and unbox each element explicitly. See download.oracle.com/javase/6/docs/api/ja... next time you're looking for a method of List.

Apache Commons Lang's ArrayUtils. ToPrimitive methods can help converting between arrays of wrappers and arrays of primitives. – prunge Nov 21 at 22:46 problem solved, thank you very much – sefirosu Nov 21 at 23:35.

Sefirosu, for another solution you can do it using Arrays.copyOf() or Arrays.copyOfRange() too. Integer integerArray = Arrays. CopyOf(list.toArray(), list.toArray().

Length, Integer. Class); Integer integerArray = Arrays. CopyOfRange(list.toArray(), 0, 4, Integer.

Class).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions