Iterators
Notes for Java programmers:
Not to be confused with Java's Iterator interface, the Wolfram Language's iterator notation reduces the code required for repetitive operations. Generally, these iterators are used for tasks that would require loops in Java.
Make a table of the first 10 squares:
Many functions in the Wolfram Language use the standard "iterator specification": min, max, step:
Notes for Java programmers:
In Java, iterative operations like this would require a for or while loop.
An alternative iterator specification just gives an explicit list of values:
Notes for Java programmers:
Using Table this way is analogous to iterating over a Java array or collection with a foreach construct.
Notes for Python programmers:
Using Table in this way is analogous to using the [... for ... in ...] list comprehension construct in Python, though it has somewhat richer semantics.
This makes a nested table: