fixes new java docs for line endings (and wording)
reformat for loop to @turt2live's specs