Created
September 8, 2011 03:06
-
-
Save max747/1202512 to your computer and use it in GitHub Desktop.
テキストファイルを1000個つくる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io._ | |
{ 1 to 1000 } map { n => "hoge%04d.txt".format(n) } foreach { name => | |
val writer = new PrintWriter(new FileWriter(name)) | |
writer.println("hogehoge") | |
writer.close | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment