android iterate list starting at index code example
Example: loop through an arraylist android studio
List<MyObject> AllData = dataBaseHelper.getAllData(); //initialize
for (MyObject obj : AllData) { //loop
if (obj.getNum() == num) { //condicion
//code
}
}