iterating over a list based on index using java : I have an ArrayList and I am iterating over the list to build a query but my query can have only 20000 characters so I am trying to iterate over certain index so I can have multiple query, how can I do it, any guidance would be helpful.

    for(int i=0;i<EntryList.size();i++){
    
    String entryValue= (String) EntryList.get(i);
    
    Query = Query+entryValue;
    }

Say my list has 500 items, I want to iterate over every 100 or 200 items to get my query.

Thank you.

