There are different styles of programming, some quite closely resemble pure mathematics. Mathematician and Computer Scientist Laurence Day compares two of them. Note: In the Java code the delimiters within the 'for' loop should be semi-colons, not commas. Apologies for the error.