Java tutorial
//package com.java2s; import java.util.Iterator; import java.util.List; public class Main { /** * <p> * This method returns the <tt>Iterator</tt> of the <tt>list</tt> object * being passed * </p> * * @param listObject * the list instance whose iterator needs to be returned * * @return * the <tt>Iterator</tt> of the list instance */ public static Iterator<? extends Object> getIteratorForList(List<? extends Object> listObj) { return listObj.iterator(); } }