2016-07-06から1日間の記事一覧
問題 以下のコードを try-with-resources 文を使わないで実装せよ。 try (Scanner in = new Scanner(Paths.get("/usr/share/dict/words")); PrintWriter out = new PrintWriter("/tmp/out.txt") ) { while (in.hasNext()) out.println(in.next().toLowerCase…
問題 以下のコードを try-with-resources 文を使わないで実装せよ。 try (Scanner in = new Scanner(Paths.get("/usr/share/dict/words")); PrintWriter out = new PrintWriter("/tmp/out.txt") ) { while (in.hasNext()) out.println(in.next().toLowerCase…