P189 ファイルへの書き出し

new File('out.txt').withWriter { writer ->

  writer << "hoge1 \n"

  writer << "hoge2 \n"

}

 

プログラミングGROOVY

プログラミングGROOVY