Skip to content

Instantly share code, notes, and snippets.

@max747
Created September 8, 2011 03:06
Show Gist options
  • Save max747/1202512 to your computer and use it in GitHub Desktop.
Save max747/1202512 to your computer and use it in GitHub Desktop.
テキストファイルを1000個つくる
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