ArrayList without repetition

Posted by tuxou on Stack Overflow See other posts from Stack Overflow or by tuxou
Published on 2010-05-04T16:35:21Z Indexed on 2010/05/04 16:38 UTC
Read the original article Hit count: 208

Filed under:
|
|

Hi

i'm using arraylist in java and i need to add integers during 10 iteration (integer is got randomly from an array of integers named arrint) without any repetion:

for (int i =0; i<10; ++i) array.add(integer);

and then add in the same array 20 other integers for the same array of integer(arrint) during 20 iteration without repetion

for (int i =0; i<10; ++i) array.add(integer);

but repetition is permited between the 10 first integers and the 20 integers

thank you

© Stack Overflow or respective owner

Related posts about java

Related posts about arraylist