learning scala write to file

scala 写文件功能:

scala> import java.io.PrintWriter
import java.io.PrintWriter

scala> val outputFile = new PrintWriter("text.txt")
outputFile: java.io.PrintWriter = java.io.PrintWriter@213c812a

scala> outputFile.println("hello panzidong")

scala> outputFile.print("spark is good")

scala> outputFile.close()

scala>

result:

learning scala write to file

上一篇:android通过BitmapFactory.decodeFile获取图片bitmap报内存溢出的解决办法


下一篇:ARM开发板系统移植-----kernel的编译