How to get around the exact size of the list?

There is a part of the code
(catalog = new ArrayList();
for (int i = 1; i <= listData.size(); i++) {
catalog.add(new ListData(names[i - 1], cost[i - 1], img[i - 1]));
help to make it so that you don't need to insert the exact size of the list , and make it through listsize or anything like that
July 9th 19 at 14:06

Find more questions by tags Android