ArrayList Java Loop : I have an ArrayList (staffList) that contain instances of the of the Staff class...however when i write the following in intellij i am told that 'for statement does not loop'...im really confused as i thought that this was the way to loop through an arraylist

    
    public String getTypist() {
        String tempTy = "";
        for (Staff g : staffList) {
            if (g.getStaffID().contains("TY") && g.isAvailable())

                tempTy = g.getStaffID();

            staffList.remove(g);
            staffWorking.add(g);
            break;

        }
        return tempTy;