@@ -0,0 +1,830 @@
+package com.yutax77.java8_ans.chap9;%0A%0Aimport java.io.IOException;%0Aimport java.io.PrintWriter;%0Aimport java.nio.file.Paths;%0Aimport java.util.Scanner;%0A%0Apublic class Ans1 %7B%0A    public static void scanAndConvertToLowerCase(String srcPath, String outFileName) throws IOException %7B%0A        Scanner in = null;%0A        PrintWriter out = null;%0A%0A        try %7B%0A            in = new Scanner(Paths.get(srcPath));%0A            out = new PrintWriter(outFileName);%0A            while (in.hasNext()) %7B%0A                out.println(in.next().toLowerCase());%0A            %7D%0A        %7D finally %7B%0A            if (in != null) %7B%0A                try %7B%0A                    in.close();%0A                %7D finally %7B%0A                    if (out != null) %7B%0A                        out.close();%0A                    %7D%0A                %7D%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

Answer chap.9-1