I am trying to append indexes with constants and get some sql. Currently I am just iterating over a list using for loop. I am looking for better ways of doing the same.
List<String> list1 = new ArrayList<>();
Integer index = 0;
for (String str : listToIterate) {
String param1 = "PARAM" + index;
String prefixParam1 = "PARAM_PREFIX" + index;
list1.add(getSomeParameterisedSql(param1, prefixParam1, str));
index = index + 1;
}