Monthly Archives: January 2010

An iterable array


Java has the nice Iterable interface (since Java 5, i guess) that allows object oriented loops like List<String> strings = new ArrayList<String>(); for(String string : strings) System.out.println(string); but guess what, a simple array is not iterable… In case you need one, feel free to use this one: package ac.simons;   import java.util.Iterator;   public class […]

Read the complete article »