Apache: Commons collection (example ListUtils lazyList)
A simple post concerning a very good class ListUtils in the library commons-collections-3.2.jar of Apache for the collection's manipulation. The method lazyList returns a "lazy" list whose elements will be created on demand. So, the outputs in console would be: Some comments: - after the code , the list is initialized with 4 elements ( from index 0 to index 3). - after the ...more»