Thursday, 22 August 2013

Repeat multiple lines in an ArrayList and add them in order back to the same ArrayList

Repeat multiple lines in an ArrayList and add them in order back to the
same ArrayList

I have an arraylist that have the following strings:
02, String1
03, Num1
03, Num2
02, String2
based on an input from another method I need to repeat the strings that
start with 03 number of times and then add it back to the same arraylist
number of times = 4 output:
02, String1
03, Num1
03, Num2
03, Num1
03, Num2
03, Num1
03, Num2
03, Num1
03, Num2
02, String2
please any help,
Thanks in advance.

No comments:

Post a Comment