Use diamond operator to simplyfiy generic collections creation. For example: ArrayList<ArrayList<Integer>> list = new ArrayList<>();
Use generalized types for declaration, unless you have good reason to use specific types. For example: List<List<Integer>> list = new ArrayList<>();
In most cases the "foreach" of Java is suffficient to iterate through collection. The C-like style with indexes is still applicable in some cases, but you will mostly use the "foreach": for (List<integer> subList : list) {...}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Few suggestions/advises:
ArrayList<ArrayList<Integer>> list = new ArrayList<>();
List<List<Integer>> list = new ArrayList<>();
for (List<integer> subList : list) {...}