Sample Code:
public class StringArrayTest {
public static List<String> generateStringArray(Integer i) {
List<String> listString = new List<String>();
for(Integer j = 0; j < i ; j++) {
listString.add(‘Test ‘ + j);
}
return listString;
}
}
Cheers!!!