1..term and an exclusive range — that is, 1 and 2 only as 1..<term Ranges facilitate looping rather efficiently. Because they are a list of values, you can leverage the each method call, which is ...
The author of this tip is John Zukowski, president and principal consultant of JZ Ventures, Inc. The enhanced for-loop is a popular feature introduced with the Java SE platform in version 5.0. Its ...