Listing D


// Listing D
 /**
 * @return Iterator filled with Strings representing user names
 */
 public Iterator getUsers() {
    ResultSet rs = userDbQuery();
    List list = new ArrayList()
    while (rs.next()) {
        list.add(rs.getString(1));
    }
    return list.iterator();
 }