begin code for example in section7,chapter10, PrimersToFile.java