This is an opportunity to show off Groovy’s Collection.inject(Object, Closure). Groovy’s GDK’s File makes reading a file’s contents as a String or as a List of Strings easier than falling off a log.
Groovy is a popular, open source, dynamic language residing on the Java Virtual Machine. Born in 2003, Groovy offers Java developers an almost-zero learning curve while gaining inspiration from Python ...